Skip to content

Instantly share code, notes, and snippets.

@cccaldas
Created December 20, 2011 11:03
Show Gist options
  • Select an option

  • Save cccaldas/1501213 to your computer and use it in GitHub Desktop.

Select an option

Save cccaldas/1501213 to your computer and use it in GitHub Desktop.
git-clone-branch
#file: git-clone-branch
mkdir $3
cd $3
git init
echo "readme" > README
git add README
git commit -m "first commit"
git branch $2
git checkout $2
git branch -D master
git remote add origin "$1"
git pull origin $2
#usage: git-clone-branch /Volumes/Simbionte/Clientes/cliente1/web/website dev dev
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment