From 049e5aaade2b6f75521e96aabd9553eb9ecfe166 Mon Sep 17 00:00:00 2001 From: Zac Dover Date: Thu, 12 Jan 2023 06:24:55 +1000 Subject: [PATCH] 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 --- doc/dev/developer_guide/basic-workflow.rst | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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 -- 2.39.5