Last active
December 8, 2016 10:41
-
-
Save andriyun/18b7aa3526945c5cdede7a75093d7eda to your computer and use it in GitHub Desktop.
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
current_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/*\(.*\)/\1/' | |
} | |
mrgto(){ | |
branch="$(current_git_branch)" | |
git checkout $1 | |
git fetch origin $1 | |
git merge origin/$1 | |
git merge $branch | |
git checkout $branch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment