X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-branch.sh;h=11d52fd78ed11887006ba23470083e2560439c0c;hb=a52e4ef877f693a69710145f56d867365a755f91;hp=e2db9063d4c63288c5834046962290ff9dfca127;hpb=1301c6eb412e7c5511b952a12e42c70ad56f028b;p=git.git diff --git a/git-branch.sh b/git-branch.sh index e2db9063..11d52fd7 100755 --- a/git-branch.sh +++ b/git-branch.sh @@ -102,4 +102,5 @@ rev=$(git-rev-parse --verify "$head") || exit git-check-ref-format "heads/$branchname" || die "we do not like '$branchname' as a branch name." -echo $rev > "$GIT_DIR/refs/heads/$branchname" +git update-ref "refs/heads/$branchname" $rev +