You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/devel/development_workflow.rst
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -63,10 +63,16 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or
63
63
git branch my-new-feature upstream/main
64
64
git checkout my-new-feature
65
65
66
+
If you started making changes on your local ``main`` branch, you can convert the
67
+
branch to a feature branch by renaming it::
68
+
69
+
git branch -m <newname>
70
+
71
+
66
72
Generally, you will want to keep your feature branches on your public GitHub
67
73
fork of Matplotlib. To do this, you ``git push`` this new branch up to your
68
-
GitHub repo. Generally (if you followed the instructions in these pages, and by
69
-
default), git will have a link to your fork of the GitHub repo, called
74
+
GitHub repo. Generally, if you followed the instructions in these pages, and by
75
+
default, git will have a link to your fork of the GitHub repo, called
70
76
``origin``. You push up to your own fork with::
71
77
72
78
git push origin my-new-feature
@@ -79,6 +85,12 @@ In git >= 1.7 you can ensure that the link is correctly set by using the
79
85
From now on git will know that ``my-new-feature`` is related to the
80
86
``my-new-feature`` branch in the GitHub repo.
81
87
88
+
If you first opened the pull request on ``main`` and then converted it to a
89
+
feature branch, you will need to close the original pull request and open a new
90
+
one for the renamed branch. See
91
+
`Github: working with branches <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches>`_.
0 commit comments