@@ -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 typing your branch name every time, you only need to type the following once to link the remote branch to the local branch::
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
171176Manage commit history
172177=====================
0 commit comments