Created
November 3, 2010 12:29
-
-
Save rodrigodealer/661027 to your computer and use it in GitHub Desktop.
Script commit que nao gera merge commit
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 -x | |
CURRENT=`git branch | grep "*" | awk '{print $2}'` | |
if [ CURRENT = "master"]; then | |
git commit -a -m "[#${CURRENT}] $1" | |
else | |
git stash | |
sink | |
git stash apply | |
git commit -a -m "[#${CURRENT}] $1" | |
git stash clear | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment