Skip to content

Instantly share code, notes, and snippets.

Created March 29, 2017 15:03
What would you like to do?
GIT - Get parent branch
git show-branch | 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