Gerrit/personal sandbox

Gerrit allows the creation of "personal sandboxes" where users can stash code that they're working on in a personal branch that doesn't require admin intervention for pushes. These personal sandboxes are not intended to replace standard Gerrit/Git branches where multiple people can collaborate on code.

The branches are named in the format "sandbox/$username/*" so I could make a sandbox called "sandbox/demon/weekend-hacking" and push that to gerrit without requiring review or anyone to make the branch first. Quick example:

$ cd mediawiki/core

$ git checkout -b sandbox/demon/foo-bar

When you're ready to push: $ git push --set-upstream origin sandbox/demon/foo-bar

(The --set-upstream is only necessary the first time you push.)

Please note the sandbox will be public.

Warning
If open changesets are included in the sandbox branch, Gerrit may decide to mark these as merged into the sandbox branch (e.g. change #39527) even though this is far from likely to be what was intended. In general, it would be best to not include open changesets in a sandbox branch, at least without amending to remove the Change-Id pseudo-header and change the commit hash, unless this is really what you intend to do.

Troubleshooting
If you originally cloned the repository from the anonymous URL, gerrit may ask you for a username and password for " https://gerrit.wikimedia.org " rather than using your SSH key when trying to push your sandbox. The command  will report an address beginning "https://" for origin. To fix it, use the following command: $ git remote set-url origin ssh://username@gerrit.wikimedia.org:29418/project/name.git (where username is your gerrit username, and project/name is the name of the project, e.g. "mediawiki/core").