search

Home  >  Q&A  >  body text

Front-end - How does github maintain multiple branches under the same master at the same time?

For example, I have a master called projectA, with two branches a and b. Can I maintain these two branches locally at the same time? How to implement it using client side?

高洛峰高洛峰2849 days ago677

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