Created
May 16, 2018 04:17
-
-
Save Nekroze/93a261cfd661b39a861ccb6d19de4a9a to your computer and use it in GitHub Desktop.
Should output the closest git branch on origin remote to the currently checked out commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --pretty=format:'%d' --abbrev-commit | grep -oE "origin\/\w+(_\w+)?" | head -n 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment