From 9961c6fedb1d2c07feb47c416b463b5b93a716ea Mon Sep 17 00:00:00 2001 From: juanis2112 Date: Sun, 14 Jul 2024 11:16:37 -0700 Subject: [PATCH 1/2] Add branch tracking to development workflow instructions Delete tab for branch tracking workflow Apply suggestions from code review Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> --- doc/devel/development_workflow.rst | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst index 23e2c17732e2..efbef2a0a1ac 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 typying your branch name every time, you can once do:: + + 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 ===================== From 92bbaa24e35aebf82f72f3b94a0ce959690ff653 Mon Sep 17 00:00:00 2001 From: Juanita Gomez Date: Thu, 25 Jul 2024 22:59:58 -0700 Subject: [PATCH 2/2] Update doc/devel/development_workflow.rst --- doc/devel/development_workflow.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/devel/development_workflow.rst b/doc/devel/development_workflow.rst index efbef2a0a1ac..03d59ad097e4 100644 --- a/doc/devel/development_workflow.rst +++ b/doc/devel/development_workflow.rst @@ -162,7 +162,7 @@ You can achieve this by using git push [your-remote-repo] [your-branch] --force-with-lease .. tip:: - Instead of typying your branch name every time, you can once do:: + 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