Hacker News new | past | comments | ask | show | jobs | submit login
Basic Gerrit Walkthrough – For GitHub Users (googlesource.com)
20 points by todsacerdoti 9 months ago | hide | past | favorite | 6 comments



I liked Gerrit when working on OpenStack several years ago. The use of patch sets seemed pretty intuitive, and it was nice that there wasn't a "force push" workflow available that would hide changes from previous reviews. I tend to use a merge rather than rebase workflow with GitHub now, but I often see developers do the opposite, which can make directly viewing code changes from previous reviews challenging.

I am surprised that this post advocates for amending commits, though. It's been a while, so I might be misremembering, but I think a tool like git review makes that unnecessary:

https://www.mediawiki.org/wiki/Gerrit/git-review

https://docs.opendev.org/opendev/git-review/latest/


Gerrit was ok, the openstack gerrit web ui was kinda iffy (at least circa 2013/14). Its been long enough that i don't really remember any details but it was bothersome enough that a couple of us wrapped the ssh gerrit commands in a cli: https://github.com/pandemicsyn/fgerrit


I've found this article before and have to say, it put me off going any further when I got to...

> # tl;dr > > Here’s how getting code reviewed and submitted with Gerrit is different from doing the same with GitHub: > > - You need to add a commit-msg hook script when you clone a repo for the first time using a snippet you can find e.g. here (link)

Well, that was enough to make me think twice.


It adds a 'Change-Id: <hash>' line to commits which let's you track a logical "change" across iterations, rebases, and branches. It's sort of the whole way Gerrit works.


Presumably if you use Gerrit a lot you can just add it to your git-template and it will be automatic (I use this for the pre-commit hook script)


There is a "Clone with commit-msg hook" copy-pastable url or `git review` setups hook automatically.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: