Created
April 24, 2014 02:29
-
-
Save rkhmelyuk/11239443 to your computer and use it in GitHub Desktop.
using git symbolic ref to save some time
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 symbolic-ref -m 'short alias m to mainline' refs/heads/m refs/heads/mainline | |
git symbolic-ref -m 'short alias h to HEAD' h HEAD | |
Now you can use the m and h aliases in git commands: | |
git log m | |
git diff m..h | |
git show-ref m | |
git branch | |
m -> mainline | |
* mainline | |
tail .git/h .git/refs/heads/m | |
==> .git/h <== | |
ref: HEAD | |
==> .git/refs/heads/m <== | |
ref: refs/heads/mainline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment