pycharm creates a new branch and submits it to GitHub

foreword

When we write more and more project codes, a master branch cannot meet the needs. At this time, we need to create branches to manage the code.
Creating a branch can quickly roll back to the version of a certain node, or multiple developers can develop a project at the same time, and submit it to their own branch when their own functions are completed.
After passing the test on the branch, finally merge the code into the master branch

pycharm creates a local branch

Open pycharm-Vcs-Git-Branches,
insert image description here
click New Branch,
insert image description here
enter the name of the new branch, and click Create
insert image description here

Push to the remote branch

After the above branch is successfully created, the branch where pycharm is located is the current new branch.
If the current code is modified, first commit and then push. If you haven't modified the code, just push it directly.
A new branch will appear on GitHub
insert image description here

Guess you like

Origin blog.csdn.net/weixin_42491648/article/details/131729450