Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Add an SSH key
  2. Set your username

Cloning from Gerrit

  • SSH:

    No Format
    git clone ssh://{user}@{server}:29418/{repo}
  • HTTP:

    No Format
    git clone http://{user}@{server}/{repo}
  • Anonymous HTTP:

    No Format
    git clone http://{server}/{repo}

Pushing to Gerrit

  1. How to push:

    No Format
    $ git push ssh://{username}@{server}:29418/{repo} HEAD:/refs/for/master
  2. Change-ID: Make sure you install the hook, if it isn't already there!
    1. Installing it:

      No Format
      scp -p -P 29418 {username}@{server}:hooks/commit-msg {local-repo}/.git/hooks/
    2. Fixing it if you forgot:

      No Format
      git commit -amend

Updating a Review

  1. Make sure any new commits use the same Change ID
  2. Squash your commits back down into one (preferably)

    No Format
    git rebase -i HEAD~{num}
  3. Re-push