Created
August 18, 2016 09:51
-
-
Save ronaldmansveld/36313669c6e04555f47e790c090cf853 to your computer and use it in GitHub Desktop.
Alias for checking out branch + merging latest master automatically
This file contains hidden or 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
| test -f ~/.profile && . ~/.profile | |
| test -f ~/.bashrc && . ~/.bashrc |
This file contains hidden or 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_com() | |
| { | |
| _git_branch | |
| } |
This file contains hidden or 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
| [alias] | |
| com = "!f() { git co master && git up && git co ${1} && git up && git merge master; }; f" |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Files go into your home directory. Type 'echo ~' in git bash to see what is set as your home directory.
The .bash_profile and .bashrc are only needed when you want autocomplete on branchnames for this alias.
Depending on your setup, you may be asked for your password twice, once for updating master, and again for updating the target branch.