tj.git-extras/bin/git-fresh-branch
2014-11-30 17:47:26 +05:30

10 lines
161 B
Bash
Executable file

#!/usr/bin/env bash
branch=$1
test -z $branch && echo "branch required." 1>&2 && exit 1
git symbolic-ref HEAD refs/heads/$branch
rm .git/index
git clean -fdx