Probably the sharpest git repository organizer & rebase/merge workflow automation tool you've ever seen
Project description
git-machete
git machete is a versatile tool for organizing your git repo, including features like:
- Neat, customizable
git machete status
that shows what branches are in sync with their parent branch/remote tracking branch and which of them need to be rebased/merged/pulled/pushed
- Semi-automatic traversal of the branches that helps you effortlessly rebase, merge, push and pull the branches you care for (
git machete traverse
)
- Automatic discovery of branch relations (
git machete discover
)
Install
We suggest a couple of alternative ways of installation.
Bash and zsh completion scripts are provided in completion/ directory, see wiki for their installation instructions.
git-machete works under both Python 2.7 and Python 3.x.
Using Homebrew (macOS)
brew tap VirtusLab/git-machete
brew install git-machete
Using Snappy (most Linux distributions)
Tip: check the guide on installing snapd if you don't have Snap support set up yet in your system.
snap install git-machete
It can also be installed via Ubuntu Software (simply search for git-machete
).
Using PPA (Ubuntu)
Tip: run sudo apt-get install -y software-properties-common
first if add-apt-repository
is not available on your system.
sudo add-apt-repository ppa:virtuslab/git-machete
sudo apt-get update
sudo apt-get install -y python3-git-machete
Using rpm (Fedora/RHEL/CentOS/openSUSE...)
Download the rpm package from the latest release
and install either by opening it in your desktop environment or with rpm -i git-machete-*.noarch.rpm
.
Using AUR (Arch Linux)
Install the AUR package git-machete using an AUR helper of your preference.
Using Nix (macOS & most Linux distributions)
On macOS and most Linux distributions, you can install via Nix:
nix-channel --add https://nixos.org/channels/nixos-unstable unstable # if you haven't set up any channels yet
nix-env -i git-machete
Using pip with sudo (system-wide install)
You need to have Python and pip
installed from system packages.
sudo -H pip install git-machete
Tip: pass an extra -U
flag to pip install
to upgrade an already installed version.
Using pip without sudo (user-wide install)
You need to have Python and pip
installed from system packages.
pip install --user git-machete
Please verify that your PATH
variable has ${HOME}/.local/bin/
included.
Tip: pass an extra -U
flag to pip install
to upgrade an already installed version.
Quick start
cd your-repo/
git machete discover --checked-out-since='2 weeks ago' # increase/decrease the timespan if you want more/less old branches included
# (see and possibly edit the suggested layout of branches - branch layout is always kept as text file .git/machete)
git machete traverse --fetch --start-from=first-root
# (put each branch one by one in sync with its parent and remote counterpart)
Git compatibility
git-machete (since version 2.13.0) is compatible with git >= 1.7.10.
Reference
See git machete help
and git machete help <command>
for reference.
Take a look at https://medium.com/virtuslab/make-your-way-through-the-git-rebase-jungle-with-git-machete-e2ed4dbacd02 for a guide on how to use the tool.
The more advanced features like automated traversal, upstream inference and tree discovery are described in the second part of the series: https://medium.com/virtuslab/git-machete-strikes-again-traverse-the-git-rebase-jungle-even-faster-with-v2-0-f43ebaf8abb0.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for git_machete-2.13.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 777c3a619bc273239702edd30176a53ddaffdafeb4a7835262e35184a35f86bd |
|
MD5 | 4b089f4c57b57d4c1e428757ca142171 |
|
BLAKE2b-256 | 4426bfe1b788460d0ab21f99bec612ecb217b537df359846d36fa64d2d87d70a |