Skip to content

Instantly share code, notes, and snippets.

@artemsky
Created Mar 29, 2017
Embed
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