r/programming • • Jun 19 '15

GitFlow considered harmful

http://endoflineblog.com/gitflow-considered-harmful
13 Upvotes

244 comments sorted by

View all comments

Show parent comments

2

u/pipocaQuemada Jun 19 '15

how is it bad at handling merges?

It's not bad at the process of merging two commits. It's bad at handing history that's merged based. For example, git log produces an ugly log, git blame fingers the wrong merge as being the source, and git bisect doesn't handle merges well.

They may accomplish the same task two different ways

Exactly. At the end of a rebase or a merge, your working directory remains the same. The only difference is the way that history is recorded: did you record the actual history (with merges), or rewrite it into a just-so story (by rebasing)?

All it really sounds like, is whatever tool you use is hiding two features under one name, and letting you sit in the dark about it, while you go and blame git's tooling because of your lack of understanding of source control.

No. There is one feature here (i.e. merging commits), and it has one name - merging. Mercurial does have rebase as an extension. It doesn't occasionally rebase when you tell it to merge. It just has tools that work well enough with a highly branching merge-oriented history so the only reason to rebase is if you're a 'clean history' fanatic who finds DAGs to be morally repugnant.

1

u/Netzapper Jun 19 '15

Wait, so you're saying I just just jump ship to mercurial?

2

u/pipocaQuemada Jun 19 '15

I think that mercurial is a better SCM than git, but it's usually impractical to move projects from one SCM to another and github has a much larger community of users than Bitbucket does.

Still, it's good to know when you're doing something because it's actually a good way to do things and when you do things because your tools are jankey. After all, if you know when you're hacking around shortcomings in your tools, you can stop doing it when you have better tools.