GIT

From Hugo Villeneuve
Revision as of 00:04, 19 February 2013 by Hugo (talk | contribs) (New page: #!/bin/bash # git-create-branch <branch_name> if [ $# -ne 1 ]; then echo 1>&2 Usage: $0 branch_name exit 1 fi branch_name=$1 git checkout -b ${branch_name} git push origin ${b...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  1. !/bin/bash
  1. git-create-branch <branch_name>

if [ $# -ne 1 ]; then

   echo 1>&2 Usage: $0 branch_name
   exit 1

fi

branch_name=$1

git checkout -b ${branch_name}

git push origin ${branch_name}

git branch --set-upstream ${branch_name} origin/${branch_name}

  1. To delete the remote branch:
  2. git push origin :${branch_name}