2.7 Merge Branch to Master
The situation in engineering practice is likely to be like this: we opened a branch on ver1 originally for some other verification, but we found that the direction of this branch was getting brighter and brighter, so we decided to abandon the original ver2 in the master and use the current branch_A 's ver2 as the final release version. From the perspective of version management, we hope that branch_A 's ver2 will be released as the master 's ver3 . How to do it? The merge command can do it.
Since branch_A is merged into master , the local working directory needs to be switched back to master using the Switch/Checkout command first .
Then click TortoiseGit à Merge… in the right-click menu .
In the Merge window that pops up , select From à Branch is branch_A and click OK .
The completion will be as shown in the picture.
In the Show log window, you can see that master points to a new merged version.
This merge version contains all the file contents in the previous master and branch_A .
In this example, the original master and branch_A are only different in files. However, it is inevitable that in our actual application, there will be cases where files with the same file name have different contents. If we use the current Little Turtle GIT to merge , the final result will be that branch_A overwrites the contents of master .
This content is originally created by EEWORLD forum user ove . If you want to reprint or use it for commercial purposes, you must obtain the author's consent and indicate the source