]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
doc/dev: add push.autoSetupRemote instructions
authorZac Dover <zac.dover@gmail.com>
Wed, 11 Jan 2023 20:24:55 +0000 (06:24 +1000)
committerZac Dover <zac.dover@gmail.com>
Wed, 11 Jan 2023 20:24:55 +0000 (06:24 +1000)
Explain how to set up push.autoSetupRemote so that the origin branch is
properly set up when running "get push" without the need for the
"--set-upstream" option.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
doc/dev/developer_guide/basic-workflow.rst

index 856107e500a15df245185b12f9b903e5e1c0ac7f..d7d8c1f26862c7a856d9a2fa70adc2b87d856991 100644 (file)
@@ -530,3 +530,26 @@ the **ptl-tool** have the following form::
              client: move client_lock to _unmount()
              client: add timer_lock support
      Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
+
+Miscellaneous
+-------------
+
+--set-upstream
+^^^^^^^^^^^^^^
+
+If you forget to include the ``--set-upstream origin x`` option in your ``git
+push`` command, you will see the following error message:
+
+::
+
+   fatal: The current branch {x} has no upstream branch.
+   To push the current branch and set the remote as upstream, use
+      git push --set-upstream origin {x}
+
+To set up git to automatically create the upstream branch that corresponds to
+the branch in your local working copy, run this command from within the
+``ceph/`` directory:
+
+.. prompt:: bash $
+
+   git config --global push.autoSetupRemote true