From: Eric Ball Date: Thu, 26 Jul 2018 00:54:47 +0000 (-0700) Subject: Simplify pull and checkout procedure X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=743b3c9e35f65123e0bcd1f07b85bbd89ed9a0e6;p=releng%2Fdocs.git Simplify pull and checkout procedure Change-Id: Ib13fa6463d0605a7cb469bedf163e0414d06419c Issue-ID: RELENG-1083 Signed-off-by: Eric Ball --- diff --git a/docs/gerrit.rst b/docs/gerrit.rst index b527e44..3e9b5db 100644 --- a/docs/gerrit.rst +++ b/docs/gerrit.rst @@ -165,34 +165,17 @@ Push patches to Gerrit ====================== #. Open a shell to the directory containing the project repo -#. Checkout the branch you would like to work on +#. Create a local working branch, based on the branch you would like to make + changes to. .. code-block:: bash - git checkout master + git fetch origin + git checkout -b new_feature_branch origin/master - Replace *master* with whichever branch you need to contribute to. Typically - master is the latest development branch. + Replace *origin/master* with whichever remote/branch you need to contribute + to. Typically master is the latest development branch. -#. Resolve any issues reported by ``git status`` as necessary - - The ``git status`` should report the following:: - - On branch master - Your branch is up to date with 'origin/master'. - - nothing to commit, working tree clean - -#. Rebase the branch before you start working on it - - .. code-block:: bash - - git pull --rebase - - This is to ensure that the branch is up to date with the latest version of - the repo. - -#. Ensure that the repo is in a clean state with ``git status`` #. Make the modifications you would like to change in the project #. Stage the modified files for commit. (Repeat for all files modified) @@ -214,8 +197,8 @@ Push patches to Gerrit #. Push the patch to Gerrit using one of the 2 methods documented: - 1. :ref:`gerrit-push-git-review` - 2. :ref:`gerrit-push-git-push` + #. :ref:`gerrit-push-git-review` + #. :ref:`gerrit-push-git-push` .. _gerrit-push-git-review: