From: Zac Dover Date: Wed, 11 Jan 2023 20:24:55 +0000 (+1000) Subject: doc/dev: add push.autoSetupRemote instructions X-Git-Tag: v18.1.0~538^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F49719%2Fhead;p=ceph.git doc/dev: add push.autoSetupRemote instructions 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 --- diff --git a/doc/dev/developer_guide/basic-workflow.rst b/doc/dev/developer_guide/basic-workflow.rst index 856107e500a..d7d8c1f2686 100644 --- a/doc/dev/developer_guide/basic-workflow.rst +++ b/doc/dev/developer_guide/basic-workflow.rst @@ -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 + +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