-
Notifications
You must be signed in to change notification settings - Fork 1
Git Branch Merge Rebase Strategy
byersd edited this page Feb 13, 2014
·
2 revisions
Please see below for a suggested Git branch/merge/rebase strategy.
git checkout -b feature-branch
git push -u origin feature-branch
(may repeat several times while you're working on your feature)
- do work, run tests
git add <your files>
git commit
git checkout master
git pull origin master
git checkout feature-branch
git rebase master
- run tests, fix conflicts
Make sure the tests are passing with merged changes from master - push branch to remote to run travis:
git push origin feature branch
(may repeat several times while you're working on your feature)
Note: This will only work if you have been added as a collaborator.
git checkout master
git rebase feature-branch
git push origin master
git branch -d feature-branch
I'm sure this could do with further work - please feel free to comment/update.
I updated this to use rebase
when updating the master branch. Here's a great explanation.