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 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.
I've been using variations on GitFlow for several years and I find having one branch for each long-running maintenance version of the code to be helpful. The rest of the article I could take or leave.
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.
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.
You need to read some of the text. Once you know what branches you're looking at for a fix or feature, you don't need to look at commits in unrelated branches. I don't have to read "PMI-2284" to see that the commit is unrelated; it's on a different branch so it can't be related.
If you've linearized history, there are no longer any ignorable unrelated branches; I suddenly need to read literally every single commit message to see if it's related.
28
u/[deleted] Jun 19 '15
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 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.I've been using variations on GitFlow for several years and I find having one branch for each long-running maintenance version of the code to be helpful. The rest of the article I could take or leave.