Last active
August 29, 2015 14:14
-
-
Save skotzko/9ded6e7464f90f496949 to your computer and use it in GitHub Desktop.
Two aliases you can use to update your fork / repo of an OSS project easily. Uses current local branch name for remote target.
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
# add to .bash_profile | |
# uses current local branch name for remote target. | |
# e.g. if on branch 'dev' will fetch & merge upstream/dev into local 'dev' branch | |
alias branch="git symbolic-ref --short -q HEAD" | |
alias update_fork='git fetch upstream && git merge upstream/$(branch) $(branch) && $(push)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment