Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
gerrit_tutorial [2020/04/21 17:38] – [Cloning repo and configuring git-review] rpjdaygerrit_tutorial [2020/04/21 17:55] (current) – [git-review --setup] rpjday
Line 31: Line 31:
 </code> </code>
  
-===== Cloning repo and configuring git-review =====+===== Cloning the test repo =====
  
 Clone a test repo: Clone a test repo:
Line 73: Line 73:
 track=1 track=1
 </code> </code>
 +
 +Finally, there are no configured hooks:
 +
 +<code>
 +$ ls -1 .git/hooks
 +applypatch-msg.sample
 +commit-msg.sample
 +fsmonitor-watchman.sample
 +post-update.sample
 +pre-applypatch.sample
 +pre-commit.sample
 +pre-merge-commit.sample
 +prepare-commit-msg.sample
 +pre-push.sample
 +pre-rebase.sample
 +pre-receive.sample
 +update.sample
 +$
 +</code>
 +
 +===== Configuring git-review =====
 +
 +Verify remotes:
 +
 +<code>
 +$ git remote -v
 +origin ssh://rpjday@gerrit.wikimedia.org:29418/mediawiki/extensions/examples (fetch)
 +origin ssh://rpjday@gerrit.wikimedia.org:29418/mediawiki/extensions/examples (push)
 +$
 +</code>
 +
 +==== Configuring git-review for origin ====
 +
 +Point ''git-review'' at origin:
 +
 +<code>
 +$ git config --global gitreview.remote origin
 +</code>
 +
 +Adds .gitconfig info:
 +
 +<code>
 +gitreview.remote=origin
 +</code>
 +
 +===== git-review --setup =====
 +
 +Set up ''git-review'':
 +
 +<code>
 +$ git review -s
 +</code>
 +
 +which does the following:
 +
 +  * check remote access for submitting branches (if no remote access, ask for username)
 +  * create remote access called "gerrit" (doesn't seem to)
 +  * install Gerrit ''commit-msg'' hook
 +
 +
  • gerrit_tutorial.1587490727.txt.gz
  • Last modified: 2020/04/21 17:38
  • by rpjday