diff --git a/doc/source/sandbox.rst b/doc/source/sandbox.rst index 2469764..16df08b 100644 --- a/doc/source/sandbox.rst +++ b/doc/source/sandbox.rst @@ -23,7 +23,7 @@ Configure Git:: git config user.name "firstname lastname" git config user.email "yourname@yourdomain.tld" - git config user.editor "yourfavouriteeditor" + git config core.editor "yourfavouriteeditor" Then configure git-review so that it knows about Gerrit. If you don't, it will do so the first time you submit a change for review. You will probably want to @@ -46,27 +46,29 @@ Run:: git status -and stage your changes with:: +There are three ways you can stage your changes. + +You can explicitly stage your new file with:: git add first-file -or:: +or, you can stage all new and modified files with:: git add . -or:: +or, you can stage ALL files (including deleted files) with:: - git add -a + git add -A Next commit your change with:: git commit .. note:: - This will take you into your editor which you set with ``git config user.editor``. + This will take you into your editor which you set with ``git config core.editor``. `Create a title for your commit message and add some text in the body. -`_ +`_ Then save the file and close the editor. Next submit your patchset to gerrit:: git review @@ -87,6 +89,18 @@ new file:: This is my second OpenStack file for that first changeset. EOF +Now add the second file, as described previously, with:: + + git add second-file + +or:: + + git add . + +or:: + + git add -A + To ensure you submit your new patchset to the same change execute:: git commit -a --amend @@ -101,12 +115,12 @@ and again you should see a URL that links to your change. Open the web browser and look at the changeset you just submitted: notice that there are two patchsets now, with patchset 2 below your original patchset 1. If you have two different URI something went wrong, most -likely you have not used *--amend* in your git commit or you've +likely you have not used ``--amend`` in your git commit or you've changed the line Change-Id in your commit message. As a last step, you should abandon your change. You can do this from -the web UI by visiting the URL of the change and hitting the *Abandon -change* button. Alternatively you can abandon a change from command +the web UI by visiting the URL of the change and hitting the *Abandon* +button. Alternatively you can abandon a change from command line using `Gerrit ssh commands `_:: ssh -l \