Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9961c6f

Browse files
juanis2112timhoffm
andcommitted
Add branch tracking to development workflow instructions
Delete tab for branch tracking workflow Apply suggestions from code review Co-authored-by: Tim Hoffmann <[email protected]>
1 parent bdbbb2d commit 9961c6f

File tree

1 file changed

+17
-12
lines changed

1 file changed

+17
-12
lines changed

doc/devel/development_workflow.rst

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,19 +79,13 @@ default, git will have a link to your fork of the GitHub repo, called
7979

8080
git push origin my-new-feature
8181

82-
In git >= 1.7 you can ensure that the link is correctly set by using the
83-
``--set-upstream`` option::
82+
.. hint::
8483

85-
git push --set-upstream origin my-new-feature
86-
87-
From now on git will know that ``my-new-feature`` is related to the
88-
``my-new-feature`` branch in the GitHub repo.
89-
90-
If you first opened the pull request from your ``main`` branch and then
91-
converted it to a feature branch, you will need to close the original pull
92-
request and open a new pull request from the renamed branch. See
93-
`GitHub: working with branches
94-
<https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches>`_.
84+
If you first opened the pull request from your ``main`` branch and then
85+
converted it to a feature branch, you will need to close the original pull
86+
request and open a new pull request from the renamed branch. See
87+
`GitHub: working with branches
88+
<https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches>`_.
9589

9690
.. _edit-flow:
9791

@@ -167,6 +161,17 @@ You can achieve this by using
167161
git commit -a --amend --no-edit
168162
git push [your-remote-repo] [your-branch] --force-with-lease
169163
164+
.. tip::
165+
Instead of typying your branch name every time, you can once do::
166+
167+
git push --set-upstream origin my-new-feature
168+
169+
From now on git will know that ``my-new-feature`` is related to the
170+
``my-new-feature`` branch in the GitHub repo. After this, you will be able to
171+
push your changes with::
172+
173+
git push
174+
170175

171176
Manage commit history
172177
=====================

0 commit comments

Comments
 (0)