Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strategy For Keeping Git Feature Branches Up to Date

I like to keep my feature branches up to date with develop. Is there anything wrong with frequently doing "git merge --no-ff develop". And then at the end, running "git flow feature finish feature1". These feature branches are shared (which means it is possible that someone else could be working on it, or that I'm developing out of it at my computer at home), mostly because I like knowing that they are backed up somewhere else. If they weren't shared, would consistently rebasing be preferred?

Or is it better to not keep your feature branches up to date and just merge everything in at the end?

like image 595
Ron Garrity Avatar asked Dec 07 '11 16:12

Ron Garrity


1 Answers

If your branches aren't public, updating via rebase is the best method. If they are public, it's better to just merge them at the end (rather than consistently merging changes into them). Both strategies keep a simple, clean commit and merge history.

like image 103
mipadi Avatar answered Oct 01 '22 03:10

mipadi