Thursday, August 5, 2010

git git git!

Create repo
mkdir mygit
cd mygit
git init
git add .
git commit -m 'initial commit'

Checkout repo
cd mygit
git clone url myrepo

Create branch
git branch -a
git checkout -b branchtoworkon origin/existingbranch or git checkout existingbranch
git branch branchtoworkon
git checkout branchtoworkon

Push branch
git push origin branchtoworkon

Create tag
git tag -l
git tag 1.0

Push tag
git push origin 1.0

Delete branch/tag
git tag -d 1.0
git branch -d branchtoworkon
git push origin :branchtoworkon

No comments:

Post a Comment