Skip to main content
290 votes

New developer can't keep up with branch merges

I assume you're using git. If so, make use of git rebase -i (the -i means interactive). Make it a daily task (even more frequently, if necessary) to rebase your branch against the develop branch. ...
Jacob Robbins's user avatar
133 votes

Whose responsibility is it to fix merge conflicts?

Person A is the one who decides when to incorporate new changes from master, so Person A will perform the merge. Person A should certainly attempt to resolve merge conflicts on their own, but if any ...
Greg Burghardt's user avatar
130 votes

New developer can't keep up with branch merges

This might be a sign of bad software engineering on the company's part. Too many inter dependencies, different issues with overlapping features, attempting to tackle issues in the wrong order etc. can ...
Ivan Anatolievich's user avatar
107 votes
Accepted

How can a developer overcome their fear of merge conflicts?

Oh god yes. I broke the build my first time. Made me so gun shy I was hiding versions in folders. Of course delaying my check-ins just made things worse. I was in hell until I figured out what I ...
candied_orange's user avatar
99 votes

New developer can't keep up with branch merges

The accepted answers I think are more of a technical "how to use Git better" nature, I think this is more of a team problem than an engineering or tooling problem. If you're encountering a lot of ...
Rowan's user avatar
  • 1,089
87 votes
Accepted

Is it better to merge "often" or only after completion do a big merge of feature branches?

The longer a branch lives, the more it is able to diverge from the main branch and the messier and more complicated the resulting merge will be when it's finally finished. Ten small conflicts are ...
mmathis's user avatar
  • 5,488
61 votes
Accepted

Is my company merging branches wrong?

Some suggestions: There is nothing wrong in having a lot of feature or bugfix branches as long as the changes done in each branch are small enough you can still handle the resulting merge conflicts ...
Doc Brown's user avatar
  • 209k
37 votes
Accepted

Strategies for merging 1 year of development in Visual Studio

There would have been a simple way which had kept your new development separate from the main branch without bringing you into this unfortunate situation: any change from the trunk should have been ...
Doc Brown's user avatar
  • 209k
29 votes
Accepted

Why use pull requests instead of merging

Pull requests provide for checks and balances, even if anyone can push to master. The biggest advantage is that they provide an opportunity for code review. The person that is responsible for ...
Thomas Owens's user avatar
  • 83.3k
29 votes

New developer can't keep up with branch merges

The most important thing about merging is that the longer you wait, the more painful it gets. And the problem grows more than linear. Three times as many conflicts are nine times as much work. There ...
gnasher729's user avatar
  • 45.9k
27 votes

How can a developer overcome their fear of merge conflicts?

In general, individual developers will be responsible for merging their own work. Delaying things only means it's more likely for others to get code into your merge target, making the merge worse.
Telastyn's user avatar
  • 109k
23 votes

How can a developer overcome their fear of merge conflicts?

Extreme Programming is (partly) based on the idea that if things are "hard" or "scary", we simply aren't practicing them enough. That's the thing: practice makes perfect. So, the ...
Jörg W Mittag's user avatar
23 votes

How can a developer overcome their fear of merge conflicts?

Yes and no In my experience, merge conflict are a result of not communicating. If you plan properly, you and your colleagues shouldn't have many merge conflict. The reason people 'fear' them, is ...
Martijn's user avatar
  • 697
19 votes

Whose responsibility is it to fix merge conflicts?

Practically speaking it is Person A, the branch owner. In reality there will be branches C, D, E, and F that will now have conflicts with master, Person B won't be able to fix them all. However, If ...
Ewan's user avatar
  • 77k
18 votes

Is my company merging branches wrong?

Are we exhibiting the very anti-pattern that was described as the 'big bang merge'? Sounds like it. Are some of the problems we're seeing a result of this merge process? Definitely How can we ...
Matthew's user avatar
  • 1,095
15 votes

New developer can't keep up with branch merges

By the time I'm ready to merge my branch back into develop (emphasis mine) Handling conflicts in git merge is often simpler than in git rebase. In Git merge you can see the whole list of files that ...
usr-local-ΕΨΗΕΛΩΝ's user avatar
14 votes

Strategies for merging 1 year of development in Visual Studio

At that stage of merge I would say that automated merging may only over complicate the process. I have had similar issues with branches that have diverged for over a year and the most effective method ...
Erdrik Ironrose's user avatar
14 votes

Is it better to merge "often" or only after completion do a big merge of feature branches?

Assuming your intention is to eventually merge A, B back into master and maintain a single code base, it is never a good idea to deviate from master too far. Deviating from master for too long, ...
kenchew's user avatar
  • 276
13 votes

Is my company merging branches wrong?

This is essentially how a lot of open source projects work, including most notably the Linux kernel, which has a lot more branches in flight than you do at any given time. The typical way to avoid big ...
Karl Bielefeldt's user avatar
12 votes

How can a developer overcome their fear of merge conflicts?

The difficulty of a merge grows with the square of the number of merge conflicts. So it doesn't matter whether you fear merge conflicts, you resolve them as soon as you can. Where I work, you branch ...
gnasher729's user avatar
  • 45.9k
11 votes

Why doesn't git merge adjacent lines without conflict?

The other answers here are all on point, but to me this always seemed like an unnecessary limitation. As others have said, in these cases you definitely wouldn't want Git to merge the lines without ...
deltacrux's user avatar
  • 227
11 votes

Whose responsibility is it to fix merge conflicts?

Generally the person who runs into the conflict also has to resolve it, after all it's the person who wants that merge to happen and resolving the conflict is required to make it happen. In your ...
Mecki's user avatar
  • 2,340
10 votes
Accepted

Should developers merge code across branches?

What concerns me here is that you make it sound like anyone checking in code has to blindly check it in to multiple branches. That is wrong. Branches should exist for a reason. The event of ...
candied_orange's user avatar
10 votes
Accepted

New developer can't keep up with branch merges

You get merge conflicts if the changes you did in your branch are near the changes your colleagues did in the develop branch in the meantime, that is, if you and your colleagues changed the same lines ...
Toxaris's user avatar
  • 261
8 votes

Why use pull requests instead of merging

Having done both feature branching and forks + pull requests I think that pull requests offer little advantage when you all are developing in the same team or company They do offer a good mechanism ...
Ewan's user avatar
  • 77k
8 votes

Strategies for merging 1 year of development in Visual Studio

A few years back we had a client with the same requirements of keeping branches separate. So we did. We never merged their branch back. They had there own unique version. We charged them extra ...
Jon Raynor's user avatar
  • 11.6k
8 votes

Is my company merging branches wrong?

I agree with both Doc Brown but I also see another antipattern: My boss, the sole authority on the trunk repository, will actually defer all of the reviews of branches until a single point in time ...
Borjab's user avatar
  • 1,339
7 votes
Accepted

Should I merge the dev branch into my user story branch?

we should not pull down latest changes from dev branch and then merge those changes into the branch for the user story This is likely the result of one of three situations: "Lazy" developers who don'...
enderland's user avatar
  • 12.1k
7 votes

Applying hotfix to intermediate commit on master

You are actually asking how to manage multiple productive versions. Gitflow does not cover this and it's a complicated topic. You can have a branch per supported version, e.g. version/1.9.0, and do a ...
marstato's user avatar
  • 4,628

Only top scored, non community-wiki answers of a minimum length are eligible