1

I had an audience member ask if Gerrit will allow you to review a commit after the fact. This would allow their current project to keep moving forward while their larger and older team could continue to learn Gerrit usage along the way. This way, their next project could fully adopt Gerrit as a gate for their commits as intended.

Joey
  • 153
  • 1
  • 8
  • This looks like a duplicate of https://stackoverflow.com/questions/1186535/how-to-modify-a-specified-commit-in-git - hopefully that should answer your question. – Matthew Daly Sep 12 '17 at 18:34
  • Do you mean "review" in the general sense of "look at" or in some Gerrit-specific sense presumably related to merging? – jwodder Sep 12 '17 at 18:35
  • Yes is it possible to review old commit. What you need to do is create the new review again with the branch name and commit number. One question do you mean to amend the commit? – danglingpointer Sep 12 '17 at 19:02
  • I mean to review the commit, without the notion of amending it because it's already been merged to the mainline (ie. master). More of an educational exercise for the committer, rather than acting as a gate for the commit. – Joey Sep 12 '17 at 20:56

1 Answers1

3

The answer to your question, yes it's possible to review the old commit using Gerrit.


Here review means you want developers or another person to view the old commit. It means you want to review the merged commit?

General work cycle is review before the merge.

git checkout <old_commit>
git review

git-review is a command-line tool for Git / Gerrit to submit a change or to fetch an existing one.

Or its possible to amend

danglingpointer
  • 4,708
  • 3
  • 24
  • 42
  • I think this *might* answer my question. Do you know if it's possible to do from the Gerrit UI? I haven't even brought up the notion of the Gerrit CL with the team I presented to. – Joey Sep 12 '17 at 20:57
  • 2
    @Joey, yes it's possible to do that using UI. You need to manenour to the tree and select the commit which you want to review. Check this link : https://gerrit-review.googlesource.com/Documentation/user-review-ui.html#new-vs-old. You can accept this as an answer by selecting a tick mark. – danglingpointer Sep 13 '17 at 07:47
  • 1
    I want to create a "[Change Screen](https://gerrit-review.googlesource.com/Documentation/user-review-ui.html#change-screen)" instance for a merged commit in a repo that has Gerrit enabled as optional (ie. "[RepoCategory:optional_review]"), where the commit was merged without usage of Gerrit. Ideally, without Git foo. Ideally, only through usage of the Gerrit UI. – Joey Sep 14 '17 at 22:24