Skip to content

Instantly share code, notes, and snippets.

@jehiah
Last active March 21, 2024 12:39
Show Gist options
  • Star 56 You must be signed in to star a gist
  • Fork 19 You must be signed in to fork a gist
  • Save jehiah/1288596 to your computer and use it in GitHub Desktop.
Save jehiah/1288596 to your computer and use it in GitHub Desktop.
show git ahead/behind info for branches
moved to github --> https://github.com/bill-auger/git-branch-status/
@joeytwiddle
Copy link

What a great script! 😍 Like you guys, I added colours and columns, and an indication of whether this branch has been merged into master, but I will admit my version is somewhat convoluted.

However, if you are only interested in the _current_ branch, then perhaps you would prefer to see ahead/behind counts on your prompt.

Git Branch in Prompt

@bill-auger
Copy link

have add some features today

  • added '*' indicator near current branch
  • added dates of the last commit beside each branch and upstream

pull from my fork for the latest version

hopefully we can soon get this coordinated into a proper project

below is a screenshot of the latest version

alt text

@bill-auger
Copy link

i have created a repo for this script on github in order to have a proper issue tracker - all further development and communications will take place there - feel free to clone, fork, star , or watch the github repo -->

https://github.com/bill-auger/git-branch-status/

this script is also now icluded in jwiegley's git-scripts collection but please direct comments, bug reports, and feature requests to the upstream issue tracker

@jehiah -
could you please merge my fork into yours - this will replace the script body with a link to the latest upstream repo on github like so:

git remote add bill-auger-gist https://gist.github.com/9335fe2633eae38d3070.git
git fetch bill-auger-gist
git merge bill-auger-gist/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment