![]() ![]() If you think there is a chance you will want to revert then use merge. Reverting (as in undoing) a rebase is considerably difficult and/or impossible (if the rebase had conflicts) compared to reverting a merge. Might you want to revert the merge for any reason? In this case the branch itself doesn't convey any additional information (the commit already has the author). I've also worked on teams that used the branch-per-developer model (we've all been there). Rebase would destroy the branch and this would not be straightforward. Or diff a feature by comparing two branches (more common). For example, one can quickly revert a feature by reverting the merge of that branch (to be fair, this is a rare operation). Some teams use the branch-per-feature model where each branch represents a feature (or bugfix, or sub-feature, etc.) In this model the branch helps identify sets of related commits. Does the branch itself represent useful information In these teams I wouldn't risk recommending rebasing for any reason. Those developers don't know much about Git and don't want to know much. I've worked on teams where the developers all came from a time when companies could afford dedicated staff to deal with branching and merging. ![]() That means, if you do not apply it correctly, you could lose committed work and/or break the consistency of other developer's repositories. This is a good way to upset other developers quickly. Rebase destroys the branch and those developers will have broken/inconsistent repositories unless they use git pull -rebase. Is the branch you are getting changes from shared with other developers outside your team (e.g. There are a few factors you should consider when choosing which operation to use. So the short answer is to pick rebase or merge based on what you want your history to look like. Rebase will present conflicts one commit at a time where merge will present them all at once.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |