search

Home  >  Q&A  >  body text

前端 - github如何同时维护同一master下的多个分支branch?

比如,我有一个master叫做projectA,下面有a,b两个分支,我能不能在本地同时维护这两个分支呢?如何使用客户端实现?

高洛峰高洛峰2767 days ago627

reply all(3)I'll reply

  • 我想大声告诉你

    我想大声告诉你2017-05-02 09:34:24

    Yes, you can open two local branches and bind the two remote branches respectively, and you can switch between them when editing. If you find it troublesome to switch back and forth, you can also build two independent libraries locally for cloning.

    reply
    0
  • 滿天的星座

    滿天的星座2017-05-02 09:34:24

    Both branches have been pulled. It’s better to switch branches when editing. This may be a little more convenient for merging later

    reply
    0
  • ringa_lee

    ringa_lee2017-05-02 09:34:24

    The problem is solved. For safety, commit the local branch under development once and synchronize it;
    Build a branch on the web side, and then after the client flashes the branch, switch to the branch and delete the contents of the local folder. Copy the files that need to be maintained by the new branch to the original local folder, and synchronize them to the remote branch;
    When you need to operate the original branch, directly select the branch on the left side of the client change, wait a few seconds, and you will see The original files in the local folder are restored to the previously deleted files. When you need to switch to another branch, the same applies;
    Pay special attention to commit and synchronization before switching branches;

    reply
    0
  • Cancelreply