Skip to content

Instantly share code, notes, and snippets.

@artemsky
Last active April 13, 2017 07:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save artemsky/13d50c4653b15e881afa67bcd6d6c904 to your computer and use it in GitHub Desktop.
Save artemsky/13d50c4653b15e881afa67bcd6d6c904 to your computer and use it in GitHub Desktop.
git log
branch=`git rev-parse --abbrev-ref HEAD`
git show-branch -a 2>/dev/null | grep '\*' | grep -v "$branch" | head -n1 | sed 's/.*\[\(.*\)\].*/\1/' | sed 's/[\^~].*//'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment