github client - How does github deploy local projects in two different folders to different branches under the same master?
迷茫
迷茫 2017-05-02 09:32:22
0
2
689

For example, there is a remote Master called a, and now there are two branches a1 and a2 under a, corresponding to different projects or different modules;
My local one has two folders that are not in the same parent directory. , corresponding to the content of branches a1 and a2, such as c:b1 and D:b2;
How can I push the content of b1 to the branch a1 and the content of b2 to the branch a2?
It would be best to have operating instructions for the Windows client, thank you!
ps, can the branched branch continue to branch? I tested it and it doesn’t seem to work?

迷茫
迷茫

业精于勤,荒于嬉;行成于思,毁于随。

reply all(2)
刘奇

Following the comment, nono, a file can have multiple branches, which means that a file has multiple versions, so you can only operate one version of the file at a time. In the same way, I have a folder in my hand. The three versions are the master version, the dev development version, and the test research version. You can only modify one version at a time. You take the test from my hand and put a new one. The ideas are added to it and then handed back to me. After everyone has a meeting, they think your idea is very good. Then everyone will do follow-up development on your idea. You will get the dev version and merge the new content of the test. Come in, everyone will develop on dev, and the stable version will eventually be merged into master.

The only difference between versions and branches is that there may be no relationship between versions, but branches generally have a derivation relationship. If dev can be merged into master, it means that a certain previous dev is derived from master, or a certain dev It is a copy of master, this is a branch.

As for if you want to make one branch for the code and another branch for the document, you can, but there is no derivation relationship between the two, and there is no point in merging them. Moreover, the code document generally does not have a mutually exclusive relationship, and will basically be modified at the same time. Instead of changing documents and code in one folder, it is better to build two git repositories

習慣沉默

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 files in the original 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;

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template