Le 12/11/2015 03:25, S Page a écrit :
On Wed, Nov 11, 2015 at 12:50 AM, Petr Bena
<benapetr(a)gmail.com> wrote:
> Ok, I will try to merge all useful stuff in
here:
>
https://www.mediawiki.org/wiki/Git_for_dummies
>
The problem is these are matters of widely-varying taste and background.
When I tried to clean up in early 2013, git experts didn't even agree on
whether the gerrit remote should be origin, or whether people should use
`git review` at all.
Hello,
git-review is a python utility that acts as a thin wrapper around Gerrit
workflow. It has been written by the OpenStack community which is a
python shop.
It comes with few issues:
* the versions that comes with Linux distributions are fairly outdated
and comes with known issues.
* installing using the python package managers is not straightforward
and has several permissions issues depending on your operating system
(some install system wide which require root, others to a user writable
dir etc)
* old versions were pushing to the HEAD of the repo iirc which is
troublesome when you are working on another branch
* some global configuration is needed
* you need a remote named gerrit
On that last point, git-review 1.26 comes with a new option 'usepushurl'
which makes git-review reuse the origin repo and just set the push url
to the ssh:// url. The 'gerrit' remote will no more be needed.
Ie in your ~/.gitconfig :
[gitreview]
usepushurl = 1
What I did until that new version is that all my clones were done with a
remote named 'gerrit' (git clone -o gerrit <url>).
Since folks are tired of debugging python stacktraces and incorrect
git-review configuration, some are recommending to use the underlying
Gerrit workflow command:
git push origin HEAD:refs/publish/<BRANCH>[/<TOPIC>]
--
Antoine "hashar" Musso