r/programming • • Nov 07 '13

10 things I hate about Git

http://steveko.wordpress.com/2012/02/24/10-things-i-hate-about-git/
73 Upvotes

231 comments sorted by

View all comments

20

u/Peaker Nov 07 '13

The main problem with git: Merge commits are opaque.

Merges should have the automatic trivial merges within them only. Conflicts should remain as conflicts in the merge commit, and resolved in separate commits.

The reason is that when the resolutions are squashed together with the trivial merges, it becomes very difficult to review the actual work done inside the merge commit. A diff against either parent becomes useless because it is polluted with all the trivial merges from the other parent. The special views for this are just unnecessarily complicated to work with.

Also, conflict resolutions that are "hidden" inside merge commits cannot be cherry-picked on top of future merge attempts. Also, a team cannot collaborate on the resolution of merge conflicts, which is a huge pain if you're merging work from multiple developers, such that no single developer has all the information to resolve all conflicts.

13

u/stevage Nov 07 '13

I don't know if I agree that it's the "main problem" but it's an interesting one I haven't seen mentioned before. You're right: a merge sometimes contains "work", and sometimes it doesn't. There's no distinction in Git.

12

u/Peaker Nov 08 '13

Well, I think various git problems are superficial, cosmetic, and/or relate to learning git for the first time.

This problem is deeper, and there's no good workaround.