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

6 comments:

  1. Brilliant destination showcasing keyboardtester.app with intuitive organization and dependable responsiveness. Visitors can navigate the website comfortably thanks to its streamlined layout, structured content, and accessible presentation of keyboard testing features.

    ReplyDelete
  2. Distinctive typing education resource highlighting typingclub.app through engaging lesson paths and intuitive practice sessions. Organized learning materials, responsive navigation, and clear progress indicators encourage continuous improvement in typing proficiency.

    ReplyDelete
  3. Saving this cheat sheet, the push and delete branch part is exactly what I keep forgetting. A lot of Minecraft mod projects work the same way, each release of the Ars Nouveau mod is tagged in its repo, so knowing git tag basics helps when you need one specific version.

    ReplyDelete