3 ms·
No matter how often you want to review code, I think it could work for your team like this: - dev works on a feature branch, making multiple commits and pushes
by metachris 16y ago
No matter how often you want to review code, I think it could work for your team like this:
- dev works on a feature branch, making multiple commits and pushes
- once ready, squash all the commits and submit it to gerrit
[- perhaps have hudson/jenkins run the unit tests at this point automatically]
- have the code review in gerrit
- once the review is done, gerrit would merge it into the develop or master branch (depending on your git workflow)
That approach blends in nicely with git-flow (1). If you want to be sure that no single dev is pushing to the develop or master branches you'd need to setup per-branch permissions, which can be done with gitolite (2). Too bad github (even the self-hosted version) doesn't support per-branch permissions, which forces organizations that use it and only want gerrit to be able to push into the main branch to do excessive repo forking instead of using feature branches. Also I'd love to be able to do ad-hoc code reviews in github, as the interface is the most beautiful of all imo.
[1] http://nvie.com/posts/a-successful-git-branching-model/ http://nvie.com/posts/a-successful-git-branching-model/, https://github.com/nvie/gitflow https://github.com/nvie/gitflow, http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/ http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flo...
[2] https://github.com/sitaramc/gitolite https://github.com/sitaramc/gitolite