diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst index 23e2c17732e2..03d59ad097e4 100644 --- a/doc/devel/development_workflow.rst +++ b/doc/devel/development_workflow.rst @@ -79,19 +79,13 @@ default, git will have a link to your fork of the GitHub repo, called git push origin my-new-feature -In git >= 1.7 you can ensure that the link is correctly set by using the -``--set-upstream`` option:: +.. hint:: - git push --set-upstream origin my-new-feature - -From now on git will know that ``my-new-feature`` is related to the -``my-new-feature`` branch in the GitHub repo. - -If you first opened the pull request from your ``main`` branch and then -converted it to a feature branch, you will need to close the original pull -request and open a new pull request from the renamed branch. See -`GitHub: working with branches -`_. + If you first opened the pull request from your ``main`` branch and then + converted it to a feature branch, you will need to close the original pull + request and open a new pull request from the renamed branch. See + `GitHub: working with branches + `_. .. _edit-flow: @@ -167,6 +161,17 @@ You can achieve this by using git commit -a --amend --no-edit git push [your-remote-repo] [your-branch] --force-with-lease +.. tip:: + Instead of typing your branch name every time, you only need to type the following once to link the remote branch to the local branch:: + + git push --set-upstream origin my-new-feature + + From now on git will know that ``my-new-feature`` is related to the + ``my-new-feature`` branch in the GitHub repo. After this, you will be able to + push your changes with:: + + git push + Manage commit history =====================