Last active
December 16, 2015 22:39
-
-
Save subelsky/5509070 to your computer and use it in GitHub Desktop.
how to add mercurial-style "in" and "out" commands to git, thanks @bkemper for showing me these
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
# I learned this from @bkemper, very useful to show what's in a commit about to be pushed to the remote repo | |
# and what's in the commits that are about to be pulled from the remote repo | |
[alias] | |
in = "!f() { [[ -z \"$1\" ]] && B='master' || B=\"$1\"; git log $B..origin/$B; }; f" | |
out = "!f() { [[ -z \"$1\" ]] && B='master' || B=\"$1\"; git log origin/$B..$B; }; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment