You are a busy person, constantly doing pull-reviews and helping other developers whilst also trying to do your own tasks. You find yourself hopping between lots of branches but you don't want to keep typing their names out all the time.
branch
helps by providing a simply interface which:
- Lists the all the branches you have checked out.
- Allows you to switch between them with a single shortcut.
- Filter search these branches and if there is only a single match, switch to it.
yarn global add @langleyu/branch
or
npm install -g @langleyu/branch
List all the branches you have checked out, for the current repository. Ordered by committerdate
.
Each line will display a numerical index and the name of the branch.
~ branch
1 test-branch-may-apple
2 test-branch-march-banana
3 test-branch-march-carrot
Checkout branch at that particular index.
~ branch 1
Switching to: test-branch-may-apple
Given the filter-query, return a list of branches those name's contains that query. Notice the indexes are different from that initial list.
~ branch march
1 test-branch-march-banana
2 test-branch-march-carrot
Given a filter-query, switching to that particular index.
~ branch march 1
Switching to: test-branch-march-banana