Thanks to visit codestin.com
Credit goes to github.com

Skip to content

git-branches prints the commit behind/ahead counts for branches.

Notifications You must be signed in to change notification settings

nareshdagra07/git-branches

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

git-branches Build Status GoDoc

git-branches is a go gettable command that displays branches with behind/ahead commit counts. If you've used GitHub, you'll notice their branches page displays this info. This is that, but for your local git repo, in the terminal.

Go to any git repo you're working on and type:

$ git branch
  feature/sanitized_anchor_context
* master
  unfinished-attempt/alternative-sort
  wip/get-tweet-body

Now, do go get -u github.com/shurcooL/git-branches on any machine with Go installed, and then:

$ git-branches
| Branch                              | Base   | Behind | Ahead |
|-------------------------------------|--------|-------:|:------|
| feature/sanitized_anchor_context    | master |    119 | 1     |
| **master**                          | master |      0 | 0     |
| unfinished-attempt/alternative-sort | master |     67 | 1     |
| wip/get-tweet-body                  | master |     40 | 1     |

| Branch                              | Remote                                     | Behind | Ahead |
|-------------------------------------|--------------------------------------------|-------:|:------|
| feature/sanitized_anchor_context    | origin/feature/sanitized_anchor_context    |      5 | 0     |
| **master**                          | origin/master                              |      0 | 1     |
| unfinished-attempt/alternative-sort | origin/unfinished-attempt/alternative-sort |      0 | 0     |
| wip/get-tweet-body                  |                                            |        |       |

The currently checked out branch is emphasized with asterisks. You can see how branches compare to master base branch locally. It supports -base option if you want to compare against a different base branch.

It's also easy to see which branches are up to date with remote, which ones need to be pushed/pulled.

Installation

go get -u github.com/shurcooL/git-branches

License

About

git-branches prints the commit behind/ahead counts for branches.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Go 100.0%