# virtuslab/git-machete

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/virtuslab-git-machete).**

1,122 stars · 63 forks · Python · MIT

## Links

- GitHub: https://github.com/VirtusLab/git-machete
- awesome-repositories: https://awesome-repositories.com/repository/virtuslab-git-machete.md

## Topics

`cli` `git` `merge` `rebase`

## Description

Git Machete is a command-line tool designed to organize, visualize, and automate complex branch hierarchies within Git repositories. It models local branch relationships as a tree structure, allowing developers to manage parent-child dependencies and maintain a clear overview of feature development directly from the terminal.

The tool distinguishes itself by using a keyboard-driven interface to provide a visual representation of branch states, enabling rapid navigation and interaction with repository history. It stores branch dependency metadata within local configuration files and automates the synchronization of local work with remote tracking branches, ensuring that development lines remain aligned.

Beyond core navigation, the utility supports the maintenance of linear commit histories through automated rebasing and fast-forward merge operations. It also streamlines collaborative processes by linking related feature branches to automate the creation and tracking of pull requests. The software is distributed as a command-line utility for use in terminal environments.

## Tags

### Development Tools & Productivity

- [Git Workflows](https://awesome-repositories.com/f/development-tools-productivity/git-workflows.md) — Organizes, visualizes, and automates complex Git branch hierarchies and rebase-based development workflows.
- [Branch Management](https://awesome-repositories.com/f/development-tools-productivity/branch-management.md) — Visualizes and organizes complex branch relationships to maintain a clear overview of feature development.
- [Keyboard-Driven Branch Navigators](https://awesome-repositories.com/f/development-tools-productivity/branch-management/project-and-branch-navigation/keyboard-driven-branch-navigators.md) — Provides a keyboard-driven interface to select and switch between project branches without leaving the terminal. ([source](https://github.com/virtuslab/git-machete#readme))
- [Branch Hierarchy Visualizers](https://awesome-repositories.com/f/development-tools-productivity/branching-workflows/branch-hierarchy-visualizers.md) — Displays local branches as a tree structure to help users understand feature relationships and simplify merge workflows. ([source](https://github.com/virtuslab/git-machete#readme))
- [Command Line Navigation Tools](https://awesome-repositories.com/f/development-tools-productivity/command-line-navigation-tools.md) — Facilitates interactive browsing and switching between project branches within the terminal.
- [TUI Wrappers](https://awesome-repositories.com/f/development-tools-productivity/command-line-wrappers/tui-wrappers.md) — Provides a terminal-based interactive interface for visualizing and navigating complex branch hierarchies.
- [History Linearization](https://awesome-repositories.com/f/development-tools-productivity/git-branching-merging/history-linearization.md) — Combines changes from child branches into the current work using fast-forward operations to maintain a clean commit history. ([source](https://github.com/virtuslab/git-machete#readme))
- [Git Repository Utilities](https://awesome-repositories.com/f/development-tools-productivity/git-repository-utilities.md) — Provides a terminal-based utility for navigating branch trees and synchronizing local work with remote tracking branches.
- [Pull Request Workflow Utilities](https://awesome-repositories.com/f/development-tools-productivity/pull-request-processes/pull-request-workflow-utilities.md) — Streamlines the creation and tracking of pull requests by linking related branches for consistent code reviews.

### Programming Languages & Runtimes

- [Branching Hierarchies](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/data-structure-type-helpers/data-structures/directed-acyclic-graphs/branching-hierarchies.md) — Models local branch relationships as a tree structure to enable traversal and synchronization of development workflows.

### DevOps & Infrastructure

- [Pull Request Automation Tools](https://awesome-repositories.com/f/devops-infrastructure/cicd-pipeline-automation/cicd-pipeline-management/ci-cd-workflows/pull-request-automation-tools.md) — Acts as a workflow assistant that links related branches to streamline the creation and tracking of pull requests.
- [Local-Remote Branch Synchronizers](https://awesome-repositories.com/f/devops-infrastructure/version-control-management/version-control-utilities/branch-management-utilities/local-remote-branch-synchronizers.md) — Compares local branch states against remote counterparts to identify divergence and apply necessary synchronization updates.
- [Automatic Pull Request Creation](https://awesome-repositories.com/f/devops-infrastructure/version-control-management/version-control-workflows/pull-request-management/automatic-pull-request-creation.md) — Automates the creation and tracking of pull requests by linking related feature branches to parent branches. ([source](https://github.com/virtuslab/git-machete#readme))
