Last active
May 8, 2017 01:29
-
-
Save tamanugi/02e58d75c873cd2e70ef406842846774 to your computer and use it in GitHub Desktop.
[Git]カレントブランチをブランチ名を指定せずにプッシュする ref: http://qiita.com/tamanugi/items/e9e4ef6c2c492d841499
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 push origin HEAD |
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 config --global push.default simple | |
$ cat ~/.gitconfig | grep default # Use the Git 1.x.x default to avoid errors on machines with old Git | |
# `git config --global push.default simple`. See http://git.io/mMah-w. | |
default = simple |
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-parse --abbrev-ref HEAD |
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 push origin $(git rev-parse --abbrev-ref HEAD) |
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 push origin (git rev-parse --abbrev-ref HEAD) |
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
$ balias gpoc 'git push origin (git rev-parse --abbrev-ref HEAD)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment