[PATCH] Documentation: describe short-hand used in fetch/pull.
[git/gitweb.git] / git-branch-script
blobade0abf06987bdb78ede571de7afe927486a2c69
1 #!/bin/sh
3 . git-sh-setup-script || die "Not a git archive"
5 branchname="$1"
6 rev=$(git-rev-parse --verify --default HEAD "$2"^0) || exit
8 [ -z "$branchname" ] && die "git branch: I want a branch name"
9 [ -e "$GIT_DIR/refs/heads/$branchname" ] && die "$branchname already exists"
11 echo $rev > "$GIT_DIR/refs/heads/$branchname"