How does git-review work?
11,476
From the fine manual:
When you submit a change, git review
does the following things:
- it looks up which branch to push to (production or whatever) in the
.gitreview
file. If it can't find this information, it pushes tomaster
- it figures out what "topic" to put on the revision (you can set the topic manually with
-t
)
- if you're resubmitting a downloaded change, it will reuse the tag of the original change
- if your commit summary contains a bug number like
bug 12345
, the tag will bebug/12345
- otherwise, the tag will be the name of your local branch
- it rebases your change against the
HEAD
of the branch you're pushing to (use-R
to skip this) - if you are submitting more than one change at once, or submitting a change that's based on another unmerged change, it will ask you whether you really meant to do that (use
-y
to skip this) - it pushes the change for review
Author by
Yo Yo Money Singh
Updated on July 25, 2022Comments
-
Yo Yo Money Singh almost 2 years
I want to know, how exactly does
git review
command work? I mean does it usegit push
command (internally) or something else to upload the changes to gerrit. This information would be useful for me while writing git hooks forgit review
. -
Shashi Ranjan about 7 yearsWhat is the location of .gitreview file? And what to edit?