After git merge, no conflicts will occur between merges and conflicts, but will be replaced directly.
伊谢尔伦
伊谢尔伦 2017-06-22 11:52:46
0
3
1035

1. The official environment has a warehouse, but for convenience, my colleagues at that time directly packaged it and developed it in the test environment. Now that the development is completed, this newly developed part has not been included in the version library. Don't know how to merge.

2. I now create a new branch based on the dev branch, and directly replace the files under the new branch with files that have not been included in the repository before, and add commit.

3. I now created a dev2 branch based on the dev branch, switched to dev2, merged the new branch, and found that the files did not merge or conflict during the merge process, but deleted the files under dev2. Created new files under the new branch.

Excuse me if you encounter similar problems, please give me some advice. Thanks!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(3)
过去多啦不再A梦

Two questions.

  1. Which part do you mean by "newly developed part"?

  2. What do you need to turn dev2 into now?

曾经蜡笔没有小新

You can try the git cherry-pick command to merge a commit into a branch.

过去多啦不再A梦

git merge will actually perform a three-way merge of the last working node of your current dev2 branch, the last node of the new branch and their common parent node. Compared with their common node, the new branch is equivalent to changing all files, and The dev2 branch has not changed, so git will choose to automatically
merge to replace the files on dev2

According to what you said, your colleague should have only adjusted some functions. You can consider using git difftool to manually merge the two branches

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!