
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
gitcheckout-cli
Advanced tools
This simple CLI tool will prompt you to conveniently choose a git branch, using keyboard arrows navigation, and check it out like a boss.
Because we're lazy. And sometimes you're so dedicated to writing long descriptive branch names, and so awesome you're working on 10 features at the same time. The least you can ask for is a CLI list with cool arrows navigation.
npm install -g gitcheckout-cli
In your git repo directory:
gitcheckout
If you want to choose a branch only from local branches:
gitcheckout -l
If you want to fetch first, before listing branches:
gitcheckout -f
Note: Currently, the "-f" option doesn't handle credentials prompt, and will not fetch in that case, or any other case of "git fetch" failure.
gitcheckout -d
If you want to delete local branches interactively:
This will display a list of local branches. You can select one or more branches to delete using the spacebar, then press Enter to confirm deletion.
Example prompt:
? Select branches to delete: (Press <space> to select, <a> to toggle all, <i> to invert selection)
◯ develop
◯ hotfix/some-very-long-name-no-way-ill-remember
◯ feature/my-awesome-feature
◯ feature/gitcheckout-is-so-cool
◯ hotfix/fish-tacos-for-lunch
◯ master
Note: The -d flag only deletes local branches. Use with caution—deleted branches cannot be recovered unless pushed to remote.
Then you'll be displayed with the available branches list. Simple pick one and hit Enter.
? Select branch to checkout: (Use arrow keys)
develop
hotfix/some-very-long-name-no-way-ill-remember
feature/my-awesome-feature
feature/gitcheckout-is-so-cool
hotfix/fish-tacos-for-lunch
> master
When prompted, you can type in to filter results
? Select branch to checkout: fish-t
> hotfix/fish-tacos-for-lunch
Display help (yes, it has a '-h' arg)
gitcheckout -h
FAQs
A CLI tool to select and checkout git branch
We found that gitcheckout-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.