dhh (owner)

Forks

Revisions

gist: 30422 Download_button fork
public
Public Clone URL: git://gist.github.com/30422.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# git-create-remote-branch <branch_name>
 
if [ $# -ne 1 ]; then
echo 1>&2 Usage: $0 branch_name
  exit 127
fi
set 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
 
echo "created ${branch_name} as a remote branch"