The git-checkout-branch tool is a command-line tool for improving the efficiency of switching git branches. It is an extended git command.
- Switch git branch interactively
- Search git branch dynamically
Instructions:
- Use the arrow keys to navigate:
↓↑→← - You can also move up and down using
jandk - Use
/to toggle search - Press
ctrl + cto quit
You can install the git-checkout-branch binary from GitHub Releases.
curl -sSL https://github.com/royeo/git-checkout-branch/releases/download/v0.4.0/git-checkout-branch-`uname -s`-`uname -m` -o /usr/local/bin/git-checkout-branch && chmod +x /usr/local/bin/git-checkout-branchYou can also use go get to install the git-checkout-branch binary:
go get -u github.com/royeo/git-checkout-branchmake sure the
$GOPATH/binfolder is in yourPATH.
It is recommended to set up an alias for checkout-branch, such as cb.
git config --global alias.cb checkout-branchUse git checkout-branch help for help information.
Checkout git branches more efficiently.
Usage:
git checkout-branch [flags]
Flags:
-a, --all List both remote-tracking branches and local branches
-r, --remotes List the remote-tracking branches
-n, --number Set the number of branches displayed in the list (default 10)
--hide-help Hide the help information
MIT Copyright (c) 2019 Royeo
