if you use something like Gerrit to manage your Git repositories (which I recommend
Fuck. That.
Gerrit is a pain to use. It takes the normal flow of Git and breaks it completely. It takes the feature Git made easy to use -- branches -- and completely ignores it. It turns branches with several commits into commits that keep absolutely no history ("Why would I describe something when there is only a single commit message.").
So far, no one managed to explain to me, in convincing terms, what Gerrit is trying to solve. The only thing I can see is "when I merge, it floods the target branch with commits", which isn't actually a problem if you do a "--squash". One "manager" here tried to explain that they switched to Gerrit to get rid of a project that had 1000s branches. Really? I don't think he realized they just changed the problem of dealing with 1000s branches to a problem of dealing with 1000s commits not merged. So it turned a tool that there is plenty documentation, there is a very well known flow into something that reduces Git into SVN.
You can't directly merge with Gerrit. You need to pick the base commit/branch (if it's "develop") and cherry pick your commit on top of it; you need a special hook around otherwise Gerrit won't work properly. Reverting changes creates a new "branch" (commit), even if you're still dealing with the same "subject".
Gerrit is even more harmful than GitFlow. You lose all the knowledge your team already has about the tool -- and general version control flow --, you lose all the history you had during development due having a single commit for everything in that "branch", and you have to train everybody to use a tool in a non-standard way in which all available documentation about it is invalid.
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.
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.
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.
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.
67
u/juliob Jun 19 '15 edited Jun 19 '15
Fuck. That.
Gerrit is a pain to use. It takes the normal flow of Git and breaks it completely. It takes the feature Git made easy to use -- branches -- and completely ignores it. It turns branches with several commits into commits that keep absolutely no history ("Why would I describe something when there is only a single commit message.").
So far, no one managed to explain to me, in convincing terms, what Gerrit is trying to solve. The only thing I can see is "when I merge, it floods the target branch with commits", which isn't actually a problem if you do a "--squash". One "manager" here tried to explain that they switched to Gerrit to get rid of a project that had 1000s branches. Really? I don't think he realized they just changed the problem of dealing with 1000s branches to a problem of dealing with 1000s commits not merged. So it turned a tool that there is plenty documentation, there is a very well known flow into something that reduces Git into SVN.
You can't directly merge with Gerrit. You need to pick the base commit/branch (if it's "develop") and cherry pick your commit on top of it; you need a special hook around otherwise Gerrit won't work properly. Reverting changes creates a new "branch" (commit), even if you're still dealing with the same "subject".
Gerrit is even more harmful than GitFlow. You lose all the knowledge your team already has about the tool -- and general version control flow --, you lose all the history you had during development due having a single commit for everything in that "branch", and you have to train everybody to use a tool in a non-standard way in which all available documentation about it is invalid.