tj.git-extras/bin/git-refactor
Dung Quang 62c8243ac5 Add comment for the code
I think it's better that we have description in the file.
2013-09-24 09:33:46 +02:00

13 lines
380 B
Bash
Executable file

#!/bin/sh
# Removed unnecessary git checkout for bug, feature and refactor
if test "$1" = "finish"; then
test -z $2 && echo "refactor <name> required." 1>&2 && exit 1
branch=refactor/$2
git merge --no-ff $branch && git delete-branch $branch
else
test -z $1 && echo "refactor <name> required." 1>&2 && exit 1
branch=refactor/$1
git checkout -b $branch &> /dev/null
fi