Skip to content

Instantly share code, notes, and snippets.

@juandebravo
Created July 15, 2011 08:28
Show Gist options
  • Save juandebravo/1084319 to your computer and use it in GitHub Desktop.
Save juandebravo/1084319 to your computer and use it in GitHub Desktop.
git_how_to
A SUCCESSFUL GIT BRANCHING MODEL
- http://nvie.com/posts/a-successful-git-branching-model/
- http://blog.plataformatec.com.br/2011/04/a-successful-git-branching-model/
git checkout -b myfeature
git commit -m "any comments..."
# based myfeature branch on the lastest work in the main branch master
git rebase master
# Push to origin my feature branch
git push origin myfeature
# Checkout the master branch
git checkout master
# Merge myfeature branch into the checkout branch
git merge --no-ff myfeature
git push origin master
# Delete the feature branch
git branch -d myfeature
# Remote tracking branches --
# http://gitready.com/beginner/2009/03/09/remote-tracking-branches.html
git branch --track feature1 origin/feature1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment