Skip to content

Instantly share code, notes, and snippets.

@abhishekthorat-tudip
Last active November 14, 2017 18:34
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 abhishekthorat-tudip/149d51eb2f7d75b27b2129a998f6bf09 to your computer and use it in GitHub Desktop.
Save abhishekthorat-tudip/149d51eb2f7d75b27b2129a998f6bf09 to your computer and use it in GitHub Desktop.
git Track your base branch/parent branch
git show-branch -a \
| grep '\*' \
| grep -v `git rev-parse --abbrev-ref HEAD` \
| 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