@dotomaz/git-switch
v1.1.1
Published
Command that switches between latest branches that you are working on.
Downloads
1
Readme
Git-Switch
A CLI utility that makes it easy to switch between several local branches that you are working on
Overview
Are you constantly switching between several branches at the same time? It can become hard to keep track of the branch
names as you switch between them. git-switch
makes this easy. It parses the reflog for branches that you were working
on and list them in a menu in CLI that you can navigate with your cursor keys. Then it automatically checks out the
branch that you had selected.
Installation
You need to have nodejs
and npm
installed.
The easiest way is to use npx
.
npx @dotomaz/git-switch
If you are using it frequently it might make sense to install it globally.
npm i -g @dotomaz/git-switch
git-switch
Usage
Just run the command inside a git repo.
git-switch --help
If you want to omit some branches, you can use the --exclude
parameter.
git-switch --exclude=master,develop,release
You can also limit the number of branches that are returned.
git-switch --limit=5
To make your life easier you can create a alias. For instance in zsh
you can put this at the end of your ~/.zshrc
file.
alias gsw="npx @dotomaz/git-switch --exclude=master,develop,release --limit=5"
License
MIT