Last active
December 19, 2015 15:53
-
-
Save jmatsu/6f8d5415fc5c02f158be to your computer and use it in GitHub Desktop.
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 rev-list --left-right $(git rev-parse --abbrev-ref HEAD)...$(git rev-parse --abbrev-ref $(git rev-parse --abbrev-ref HEAD)@{upstream})|tail -1|sed 's/^<//' | |
current_branch=$(git rev-parse --abbrev-ref HEAD) | |
tracked_branch=$(git rev-parse --abbrev-ref ${current_branch}@{upstream}) | |
git rev-list --left-right ${current_branch}...${tracked_branch}|tail -1|sed 's/^<//' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment