Home Home > GIT Browse
summaryrefslogtreecommitdiff
blob: 67f880fc65d06c01c47c69db3069b6db112fe4ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh
# git-create-branch <branch_name>

if [ $# -ne 1 ]; then
         echo 1>&2 Usage: $0 branch_name
         exit 127
fi

branch_name="$1"
git push origin origin:refs/heads/${branch_name}
git fetch origin
git checkout --track -b ${branch_name} origin/${branch_name}
git pull