Skip to content

Instantly share code, notes, and snippets.

@rodrigodealer
Created November 3, 2010 12:29
Show Gist options
  • Save rodrigodealer/661027 to your computer and use it in GitHub Desktop.
Save rodrigodealer/661027 to your computer and use it in GitHub Desktop.
Script commit que nao gera merge commit
#!/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