I have a project under git. I'd like to start a new branch to add a major new feature. Under the main branch, I'll continue to add bug fixes and minor features. At regular intervals I'd like to pull the changes from the main branch into my "major new feature" branch. What's the best way to do this? Eventually, I'll merge the "major new feature" branch into the main branch.
+1
A:
git checkout featurebranch && git merge master
You can do this as many times as you like; it won't affect master and you will be able to easily do it the other way around whenever you find out you are done with the feature branch.
David Winslow
2010-06-26 16:30:25
`git rebase master` may be more desirable than `git merge master` for simplifying later integration back into the master branch.
Amber
2010-06-26 16:55:33
+1
A:
git checkout featurebranch && git rebase master
As long as you haven't pushed yet, it is better to replay your changes on top of master.
See:
VonC
2010-06-26 16:59:03