Home

Awesome

git-jump CLI logo

Git Branches Helper

Give it a ⭐️ if you like it. This really helps.

<p align="center"> <img src="https://raw.githubusercontent.com/mykolaharmash/git-jump/main/img/demo.gif" alt="git jump interactive interface" width="600px" style="border-radius: 5px;" /> </p>

Install

npm install -g git-jump

or using Homebrew

brew tap mykolaharmash/git-jump
brew install git-jump

Usage

git jump

Run without arguments to launch the interactive UI.

<br />
git jump <branch name>

Switches to a branch. <branch name> can be just part of the name, git jump will look for the best matching branch.

<br />
git jump [--list | -l]

Shows a plain list of branches without interactive UI but with sorting.

<br />
git jump <any native switch arguments>

You can use git jump as a drop-in replacement for native git switch. git jump will proxy all the argument to the native command, so you don't have to think to use one or the other.

For example git jump my-branch --discard-changes works just fine.

<br />
git jump new <branch name>

Creates a new branch and switches into it. Supports all native parameters of git switch, for example git jump new <branch name> --track origin/main.

<br />
git jump rename <branch name> <new branch name>

Renames a branch.

<br />
git jump delete <branch name> [<branch name>, ...]

Deletes one or multiple branches. No fuzzy matching here, of course 🙂.

How To Enable <kbd>Option/Alt</kbd>+<kbd><number></kbd> Shortcut

It might be disabled by default in your terminal, here is how to make it work in some apps.

iTerm 2

In Preferences go to Profiles, select your profile and go to Keys. At the bottom set Left Option (⌥) Key to Esc+.

iTerm 2 app preferences window

macOS Terminal

In Preferences go to Profiles, select your profile and go to Keyboard. Enable Use Option as Meta key checkbox.

macOS Terminal app preferences window

Hyper

Open .hyper.js and add next line to the config section:

modifierKeys: { altIsMeta: true }