Created
June 8, 2012 08:48
-
-
Save chestozo/2894548 to your computer and use it in GitHub Desktop.
Merge to master
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
function __get_git_branch { | |
local br="" | |
local git="$(git symbolic-ref HEAD 2> /dev/null)" | |
# git | |
if [ -n "$git" ]; then | |
br="${git##refs/heads/}" | |
fi | |
echo "$br" | |
} | |
function merge-to-master { | |
local br=$(__get_git_branch) | |
git co master | |
git pull | |
git merge $br | |
git co - | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment