@@ -79,19 +79,13 @@ default, git will have a link to your fork of the GitHub repo, called
79
79
80
80
git push origin my-new-feature
81
81
82
- In git >= 1.7 you can ensure that the link is correctly set by using the
83
- ``--set-upstream `` option::
82
+ .. hint ::
84
83
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> `_.
95
89
96
90
.. _edit-flow :
97
91
@@ -167,6 +161,17 @@ You can achieve this by using
167
161
git commit -a --amend --no-edit
168
162
git push [your-remote-repo] [your-branch] --force-with-lease
169
163
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
+
170
175
171
176
Manage commit history
172
177
=====================
0 commit comments