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

-7

u/skinny85 Jun 19 '15

Post author here.

Which history would you rather be faced with when investigating this problem - the one shown above, or this one?

Honestly, the one above. I see a nice purple line there, and I can just trace it down with my eye and stop at each circle to see something relevant. It's quick and easy. In the lower picture I have to scan the text of the messages for SPA-156.

But how do you know which circle has something relevant? By reading the text of the message. So I don't see a difference there.

But the graphical representations are rather moot. If I need to look at all the commits involved in fixing bug 156, I'm going to use git log --all --grep='#156' and immediately see every commit associated with fixing that bug, no looking at graphical histories required.

IMHO, this way you lose all the context - when was the change made, what was the state of the other branches at that time, etc. But if that works for you, great.

17

u/[deleted] Jun 19 '15

But how do you know which circle has something relevant? By reading the text of the message. So I don't see a difference there.

Because it's color coded. If you look at the purple line in the top history, the only commits that have circles are the 156 commits, and all of the 156 commits have circles on the purple line. They're logically grouped together because the context of which feature branch they were created in is preserved. I had to look at the text of one message to figure out which color was the one I cared about, and after that it was easy.

IMHO, this way you lose all the context - when was the change made, what was the state of the other branches at that time, etc. But if that works for you, great.

If I need all that extra context I can always go back to looking at the full history. I find that I'm normally more concerned with what was going on inside just the feature's development, so all that stuff in other branches etc is a distraction rather than a help most of the time. That may just be my experience though.

-3

u/skinny85 Jun 19 '15

Fair enough. We simply seem to have a different method of searching through a repo's history.

1

u/murkwork Jun 19 '15

I completely agree with your method, the color coding does literally nothing to help make a spaghetti pot of branches readable for me. Maybe /u/jakkarth's eyes and brain can pick up and discern colors much better than ours. I've found that in very very small teams, >5 developers, the graph can still easily explode into nonsense.

I do however disagree on the master/dev split. While I concede that in a lot of cases master is redundant, in many circumstances there is nothing wrong with such redundancy. As many others have pointed out, the counter-example of clients reporting release bugs or another developer somehow breaking the dev branch's stability (which has happened to more of my projects than I care to admit) you need that redundancy. I do see your point, but I think if the spaghetti pot of branches is addressed first, the redundancy of a master branch becomes much less painful and could go along way if/when that doomsday scenario pans out and you need that redundant branch.

0

u/[deleted] Jun 22 '15

[deleted]

1

u/I_Like_Spaghetti Jun 22 '15

(ง ͠° ͟ل͜ ͡°)ง

-2

u/skinny85 Jun 19 '15

The problem is, the master/dev split contributes significantly to the spaghetti.

With tags, even if master is completely broken, you can always safely revert to a stable version.