@@ -63,10 +63,15 @@ what the changes in the branch are for. For example ``add-ability-to-fly``, or
6363 git branch my-new-feature upstream/main
6464 git checkout my-new-feature
6565
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+
6671Generally, you will want to keep your feature branches on your public GitHub
6772fork 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
73+ GitHub repo. Generally, if you followed the instructions in these pages, and by
74+ default, git will have a link to your fork of the GitHub repo, called
7075``origin ``. You push up to your own fork with::
7176
7277 git push origin my-new-feature
@@ -79,6 +84,12 @@ In git >= 1.7 you can ensure that the link is correctly set by using the
7984From now on git will know that ``my-new-feature `` is related to the
8085``my-new-feature `` branch in the GitHub repo.
8186
87+ If you first opened the pull request from your ``main `` branch and then
88+ converted it to a feature branch, you will need to close the original pull
89+ request and open a new pull request from the renamed branch. See
90+ `GitHub: working with branches
91+ <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-branches#working-with-branches> `_.
92+
8293.. _edit-flow :
8394
8495The editing workflow
0 commit comments