Skip to content

Instantly share code, notes, and snippets.

@gschueler
Created December 21, 2010 23:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gschueler/750784 to your computer and use it in GitHub Desktop.
Save gschueler/750784 to your computer and use it in GitHub Desktop.

feature branch changes

git checkout development # load development branch
git pull origin # synch with remote
git checkout -b myfeature # create new feature branch and check out
# commit changes
git checkout development # go back to development
git pull origin # see if any changes from upstream

if there were changes, going to rebase on my feature branch:

git checkout myfeature
git rebase development # handle any merge conflicts and commit

Now i can merge to development and push:

git checkout development
git merge --no-ff myfeature # handle any merge conflicts
git push origin development

changes without feature branch

git checkout development
git pull origin
# make some commits..
git push origin development 

if there are upstream changes it will warn and need to rebsae/merge

git fetch origin # gets the remote branch without merging
git rebase origin/development #rebase from the remote branch
# handle any conflicts, and commit them
git push origin development
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment