Skip to content

Instantly share code, notes, and snippets.

@AlexandrFadeev
Created December 26, 2018 10:10
Show Gist options
  • Save AlexandrFadeev/69ad5fa0d46fe46a2f77a90dc614ef58 to your computer and use it in GitHub Desktop.
Save AlexandrFadeev/69ad5fa0d46fe46a2f77a90dc614ef58 to your computer and use it in GitHub Desktop.
Find parent branch
[alias]
parent = "!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