The git checkout-branch
command is a custom git command to improve the efficiency of switching branches.
- Switch git branch interactively
- Search git branch dynamically
Instructions:
- Use the arrow keys to navigate:
↓
↑
→
←
- You can also move up and down using
j
andk
- Use
/
to toggle search
Use go get
to install the git checkout-branch
command:
go get github.com/royeo/git-checkout-branch
make sure the
$GOPATH/bin
folder is in yourPATH
.
If you are using the GO1.11 module, use the following command to install:
GO111MODULE=off go get github.com/royeo/git-checkout-branch
It is recommended to set up an alias for checkout-branch
, such as cb
.
git config --global alias.cb checkout-branch
Use 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