Skip to content

a super quick fuzzy-search powered `git checkout` in the command line

Notifications You must be signed in to change notification settings

cesque/checkout

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@cesque/checkout

a simple command line fuzzy-searching git checkout and git merge replacement

Usage

Use checkout to interactively check out a branch, or merge to interactively merge another branch into the current one. In the following example, you could just as easily use the merge command instead of checkout.

checkout test

opens an interactive picker:

checkout master
▶ test-branch
  some-test-branch
  feature/add-new-test-cases
  fix/testing-changes

then checks out the branch you select:

checking out branch: test-branch
Switched to branch 'test-branch'

You can also pass the -f argument to automatically choose the branch that matches the input most closely, without opening the interactive picker. For example:

merge -f test

would output

merge -f test
merging branch: test

completing the merge automatically with no user input required.


If you want, you can use the base command fuzz, which performs a checkout unless invoked with the flag -m which will perform a merge instead. Thus checkout [branch] -> fuzz [branch] and merge [branch] -> fuzz -m [branch]. You should most likely use the checkout and merge aliases over using fuzz.

Install

With npm installed, run

$ npm install -g @cesque/checkout

About

a super quick fuzzy-search powered `git checkout` in the command line

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published