EnglishFrenchSpanish

Ad


OnWorks favicon

git-review - Online in the Cloud

Run git-review in OnWorks free hosting provider over Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

This is the command git-review that can be run in the OnWorks free hosting provider using one of our multiple free online workstations such as Ubuntu Online, Fedora Online, Windows online emulator or MAC OS online emulator

PROGRAM:

NAME


git-review — Submit changes to Gerrit for review

SYNOPSIS


git-review [-r remote] [-uv] -d change [branch]
git-review [-r remote] [-uv] -x change [branch]
git-review [-r remote] [-uv] -N change [branch]
git-review [-r remote] [-uv] -X change [branch]
git-review [-r remote] [-uv] -m change-ps-range [branch]
git-review [-r remote] [-fnuv] -s [branch]
git-review [-fnuvDRT] [-r remote] [-t topic] [--reviewers reviewer ...] [branch]
git-review -l
git-review --version

DESCRIPTION


git-review automates and streamlines some of the tasks involved with submitting local
changes to a Gerrit server for review. It is designed to make it easier to comprehend
Gerrit, especially for users that have recently switched to Git from another version control
system.

change can be changeNumber as obtained using --list option, or it can be
changeNumber,patchsetNumber for fetching exact patchset from the change. In that case local
branch name will have a -patch[patchsetNumber] suffix.

The following options are available:

-d change, --download=change
Download change from Gerrit into a local branch. The branch will be named after the
patch author and the name of a topic. If the local branch already exists, it will
attempt to update with the latest patchset for this change.

-x change, --cherrypick=change
Apply change from Gerrit and commit into the current local branch ("cherry pick").
No additional branch is created.

This makes it possible to review a change without creating a local branch for it. On
the other hand, be aware: if you are not careful, this can easily result in
additional patch sets for dependent changes. Also, if the current branch is
different enough, the change may not apply at all or produce merge conflicts that
need to be resolved by hand.

-N change, --cherrypickonly=change
Apply change from Gerrit into the current working directory, add it to the staging
area ("git index"), but do not commit it.

This makes it possible to review a change without creating a local commit for it.
Useful if you want to merge several commits into one that will be submitted for
review.

If the current branch is different enough, the change may not apply at all or
produce merge conflicts that need to be resolved by hand.

-X change, --cherrypickindicate=change
Apply change from Gerrit and commit into the current local branch ("cherry pick"),
indicating which commit this change was cherry-picked from.

This makes it possible to re-review a change for a different branch without creating
a local branch for it.

If the current branch is different enough, the change may not apply at all or
produce merge conflicts that need to be resolved by hand.

-m change-ps-range, --compare=change-ps-range
Download the specified patchsets for change from Gerrit, rebase both on master and
display differences (git-diff).

change-ps-range can be specified as
changeNumber,oldPatchSetNumber[-newPatchSetNumber]

oldPatchSetNumber is mandatory, and if newPatchSetNumber is not specified, the
latest patchset will be used.

This makes it possible to easily compare what has changed from last time you
reviewed the proposed change.

If the master branch is different enough, the rebase can produce merge conflicts.
If that happens rebasing will be aborted and diff displayed for not-rebased
branches. You can also use --no-rebase (-R) to always skip rebasing.

-f, --finish
Close down the local branch and switch back to the target branch on successful
submission.

-n, --dry-run
Don't actually perform any commands that have direct effects. Print them instead.

-r remote, --remote=remote
Git remote to use for Gerrit.

-s, --setup
Just run the repo setup commands but don't submit anything.

-t topic, --topic=topic
Sets the target topic for this change on the gerrit server. If not specified, a bug
number from the commit summary will be used. Alternatively, the local branch name
will be used if different from remote branch.

-T, --no-topic
Submit review without topic.

--reviewers reviewer ...
Subscribe one or more reviewers to the uploaded patch sets. Reviewers should be
identifiable by Gerrit (usually use their Gerrit username or email address).

-u, --update
Skip cached local copies and force updates from network resources.

-l, --list
List the available reviews on the gerrit server for this project.

-y, --yes
Indicate that you do, in fact, understand if you are submitting more than one patch.

-v --verbose
Turns on more verbose output.

-D, --draft
Submit review as a draft. Requires Gerrit 2.3 or newer.

-R, --no-rebase
Do not automatically perform a rebase before submitting the change to Gerrit.

When submitting a change for review, you will usually want it to be based on the tip
of upstream branch in order to avoid possible conflicts. When amending a change and
rebasing the new patchset, the Gerrit web interface will show a difference between
the two patchsets which contains all commits in between. This may confuse many
reviewers that would expect to see a much simpler difference.

Also can be used for --compare to skip automatic rebase of fetched reviews.

--track
Choose the branch to submit the change against (and, if rebasing, to rebase against)
from the branch being tracked (if a branch is being tracked), and set the tracking
branch when downloading a change to point to the remote and branch against which
patches should be submitted. See gitreview.track configuration.

--no-track
Ignore any branch being tracked by the current branch, overriding gitreview.track.
This option is implied by providing a specific branch name on the command line.

--version
Print the version number and exit.

CONFIGURATION


This utility can be configured by adding entries to Git configuration.

The following configuration keys are supported:

gitreview.username
Default username used to access the repository. If not specified in the Git
configuration, Git remote or .gitreview file, the user will be prompted to
specify the username.

Example entry in the .gitconfig file:

[gitreview]
username=mygerrituser

gitreview.scheme
This setting determines the default scheme (ssh/http/https) of gerrit remote

gitreview.host
This setting determines the default hostname of gerrit remote

gitreview.port
This setting determines the default port of gerrit remote

gitreview.project
This setting determines the default name of gerrit git repo

gitreview.remote
This setting determines the default name to use for gerrit remote

gitreview.branch
This setting determines the default branch

gitreview.track
Determines whether to prefer the currently-tracked branch (if any) and the
branch against which the changeset was submitted to Gerrit (if there is
exactly one such branch) to the defaultremote and defaultbranch for submitting
and rebasing against. If the local topic branch is tracking a remote branch,
the remote and branch that the local topic branch is tracking should be used
for submit and rebase operations, rather than the defaultremote and
defaultbranch.

When downloading a patch, creates the local branch to track the appropriate
remote and branch in order to choose that branch by default when submitting
modifications to that changeset.

A value of 'true' or 'false' should be specified.

true Do prefer the currently-tracked branch (if any) - equivalent to
setting --track when submitting changes.

false Ignore tracking branches - equivalent to setting --no-track (the
default) or providing an explicit branch name when submitting
changes. This is the default value unless overridden by
.gitreview file, and is implied by providing a specific branch
name on the command line.

gitreview.rebase
This setting determines whether changes submitted will be rebased to the
newest state of the branch.

A value of 'true' or 'false' should be specified.

false Do not rebase changes on submit - equivalent to setting -R when
submitting changes.

true Do rebase changes on submit. This is the default value unless
overridden by .gitreview file.

This setting takes precedence over repository-specific configuration in the
.gitreview file.

color.review Whether to use ANSI escape sequences to add color to the output displayed by
this command. Default value is determined by color.ui.

auto or true If you want output to use color when written to the terminal
(default with Git 1.8.4 and newer).

always If you want all output to use color

never or false
If you wish not to use color for any output. (default with Git
older than 1.8.4)

git-review will query git credential system for gerrit user/password when authentication
failed over http(s). Unlike git, git-review does not persist gerrit user/password in git
credential system for security purposes and git credential system configuration stays under
user responsibility.

Use git-review online using onworks.net services


Free Servers & Workstations

Download Windows & Linux apps

  • 1
    Phaser
    Phaser
    Phaser is a fast, free, and fun open
    source HTML5 game framework that offers
    WebGL and Canvas rendering across
    desktop and mobile web browsers. Games
    can be co...
    Download Phaser
  • 2
    VASSAL Engine
    VASSAL Engine
    VASSAL is a game engine for creating
    electronic versions of traditional board
    and card games. It provides support for
    game piece rendering and interaction,
    and...
    Download VASSAL Engine
  • 3
    OpenPDF - Fork of iText
    OpenPDF - Fork of iText
    OpenPDF is a Java library for creating
    and editing PDF files with a LGPL and
    MPL open source license. OpenPDF is the
    LGPL/MPL open source successor of iText,
    a...
    Download OpenPDF - Fork of iText
  • 4
    SAGA GIS
    SAGA GIS
    SAGA - System for Automated
    Geoscientific Analyses - is a Geographic
    Information System (GIS) software with
    immense capabilities for geodata
    processing and ana...
    Download SAGA GIS
  • 5
    Toolbox for Java/JTOpen
    Toolbox for Java/JTOpen
    The IBM Toolbox for Java / JTOpen is a
    library of Java classes supporting the
    client/server and internet programming
    models to a system running OS/400,
    i5/OS, o...
    Download Toolbox for Java/JTOpen
  • 6
    D3.js
    D3.js
    D3.js (or D3 for Data-Driven Documents)
    is a JavaScript library that allows you
    to produce dynamic, interactive data
    visualizations in web browsers. With D3
    you...
    Download D3.js
  • More »

Linux commands

Ad