uploading changes to github for review

we used git and gerrit to maintain/review code on our project at qualcomm

is anyone familiar with using such a tool for less professional collaboration? can gerrit be used over the web or collaboratively

I don't have any experience with Gerrit, but it looks to me like GitHub provides replacements for all its functionality through the pull request review system.

Are you familiar with the GitHub pull request review system? If so, what does it miss that Gerrit provides?

sorry.

i didn't pick up on pull request review system. i'll need to study it.

in general, changes shouldn't be on the master branch without be reviewed/approved. is this your understanding of what it does?

Let's say we are collaborating on a project in a repository (let's call the repository gcjr/TheProject). The way GitHub's pull request system works is:

  • I create a branch (let's call the branch "some-feature"). Usually the branch would be in my own fork of the repository (per1234/TheProject), but if I had write permissions in gcjr/TheProject, the branch could be in gcjr/TheProject.
  • I make a change.
  • I commit the change to the branch.
  • I submit a pull request from my "some-feature" branch to the "master" branch (doesn't necessarily need to be to the "master" branch).

Now, only someone with write permissions in the gcjr/TheProject can merge that pull request. Until it's merged my pull request is just a proposal for a change I'd like to make to the target branch. If I had write permissions to gcjr/TheProject, I could merge my own pull request, but often the way it works is you will want someone else involved in the project to review the proposal and approve it before it's merged. It's not absolutely necessary to have an integrated system for that review process, but it's nice to have. GitHub provides such an integrated review system. You can configure the repository to block merging of the pull request until it has a formal approval from someone with write permissions to the repository. You can assign the review to a GitHub user. The reviewer can comment or suggest changes to any line of code in the pull request diff, or just make general comments as part of the review. Each of those comments becomes a thread, so other collaborators can reply to the review comments. The reviewer can request changes be made to the pull request or approve the pull request.

We use GitHub reviews extensively at Arduino. Every pull request must be reviewed and approved before it can be merged.

You can also set up continuous integration to automatically run tests, etc. on the pull request when it is submitted and every time a commit is pushed to the pull request branch. GitHub has a native CI/CD system called GitHub Actions, or you can use a 3rd party service like Travis CI.

pert

thanks for the explanation.
this feature should work for me.

(confused why it's called a pull request and not a push request. forgotten how to use git).

I guess the idea is that, although the person submitting the PR is doing a push, the request is for someone with write access in the repository to pull the commit(s) from the PR.

just want to let anyone interested know that i'm very satisfied with the github pull-request review process and thank pert for making me aware of it. it is similar to my use of gerrit for reviewing changes at Qualcomm.

using git locally (cygwin) is a good way to archive working versions of code and experiment w/o fear of losing anything. github not only provides a backup, but supports working and learning from others.