3 ms·
`git branch` doesnt do that. `git branch | less` followed by search might, if I remember some part of the branch name well enough to search for it. Printing al
by Anderkent 14y ago
`git branch` doesnt do that. `git branch | less` followed by search might, if I remember some part of the branch name well enough to search for it.
Printing all the branches and having me scroll two screens up to find the one that's in color is not a solution to 'what branch am i on'
- fr0sty 14y agogit branch gives you a nice asterisk too: $git branch * MyBranch NotMyBranch It prints the branch as the first line of git status: $git status # On branch Foo ... It also ships with a 'bash-competion' file which gives you a very simple way to disply the current branch (among other things) rather simply. And of course you can also create your own alias if it is something you wish to do often.
- philwelch 14y agoWhy are you keeping hundreds of branches open at a time?