Created
November 25, 2013 20:08
-
-
Save idcmp/7647931 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
[idcmp@idcmp ~]$ cat ~/bin/git-finish | |
#!/bin/bash | |
if [ "$1" = "." ]; then | |
GIT_BRANCH=`git branch --no-color | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'` | |
elif [ -z "$1" ]; then | |
echo "Please specify the branch name." | |
exit 1 | |
else | |
GIT_BRANCH=$1 | |
fi | |
git branch $GIT_BRANCH -m merged/$GIT_BRANCH | |
git co master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment