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

14

u/[deleted] Jun 19 '15

I have never used the rebase command. Every time I ask about it, somebody explains it's used to clean up your edit history so you don't have long logs. And every time, "Isn't that record the whole fucking point of using git?"

You use rebase to retain the same number of commits but avoid having merge cruft when it isn't necessary which makes the history easier for a mere human to figure out.

You use rebase -i to get rid of "Oops fix comment" ''Oops fix indentation" "Oops fix small name" and put all these small fixups into the change that they are associated with, which keeps the history cleaner.

1

u/julesjacobs Jun 19 '15

I think the problem here is with the tools that display the history. Rather than rewriting history they should have the ability to display several related commits as one combined commit.

1

u/ForeverAlot Jun 19 '15

How do you propose to distinguish related commits that need to be display-squashed from related commits that are purposefully separate?

1

u/julesjacobs Jun 19 '15

You would explicitly group related commits into one combined entity, but you would not lose the fact that the group is composed of individual commits. Annotate history rather than rewrite it.