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

39

u/1_800_UNICORN Jun 19 '15

Gerrit is the worst, and I'm surprised that someone who cares about Git history would bring it up.

Gerrit encourages you to make giant commits (since each commit becomes a separate code review), and if you have Gerrit tied to your CI and it fails for some reason, or your code reviewer asks you to make changes, new updates are supposed to be amended to the old commit, so the history of what you changed is lost.

6

u/[deleted] Jun 19 '15

Gerrit encourages you to make giant commits (since each commit becomes a separate code review), and if you have Gerrit tied to your CI and it fails for some reason, or your code reviewer asks you to make changes, new updates are supposed to be amended to the old commit, so the history of what you changed is lost.

Phabricator does the same thing, its retarded

3

u/theinternn Jun 19 '15

No, phabricator amends your new commit to the existing differential; differential still has copies of all commits made. arc land will squash your entire feature after it's been approved.

The only history lost in git is the history of how you completed the feature, which frankly no one cares about; people care about what changes went into master (IE got deployed) and the changes of the feature.

Historically, if you really need to see the mistakes or discussion of the feature, you can always get linked back to the differential which has the full history.

Note here: https://reviews.freebsd.org/D2850

If you scroll down to Revision Update History, you can see there's two diffs attached to this differential. This is the unuseful history lost by git, but saved by phab.

1

u/[deleted] Jun 19 '15

Its only unuseful if you don't spend time separating your feature into multiple commit

1

u/theinternn Jun 19 '15

If it's a multi step project, then associate multiple differentials with a task: https://secure.phabricator.com/T4209

1

u/[deleted] Jun 19 '15

This is incredibly annoying to do and there is no way to update all diffs at once

1

u/theinternn Jun 19 '15

The only thing you need to do to attach your diff to your task is add the task number in the commit message

1

u/[deleted] Jun 19 '15

I mean update all diffs to new changes. Usually they depend on each other