Created
July 14, 2012 12:47
-
-
Save tomykaira/3111090 to your computer and use it in GitHub Desktop.
git-mergeto does non-fast-forward merge from the current branch onto the specified branch.
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
#!/bin/sh -e | |
BRANCH=`git symbolic-ref HEAD 2>/dev/null | cut -d/ -f3` | |
if [ x$1 = 'x' ]; then | |
TO='master' | |
else | |
TO=$1 | |
fi | |
git checkout $TO | |
git merge $BRANCH --no-ff | |
git branch -d $BRANCH |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment