Problem with deleting files after git merging branches.
天蓬老师
天蓬老师 2017-05-02 09:52:50
0
2
1221

Now I have two branches master and dev. There are ten files on the master and nine files on the dev. These eight files are the same as the files on the master.
Now I modify the contents of 8 files on dev, and then switch to the master branch to merge the contents of dev. After that, the two files on my master branch also disappeared, and master completely became the dev branch. . But I still want those two files. How should this problem be dealt with?
Thanks for the help%%

天蓬老师
天蓬老师

欢迎选择我的课程,让我们一起见证您的进步~~

reply all(2)
仅有的幸福

The reason may be that you have deleted those files in dev

The concept of merge is "merging changes from other branches into this branch". Deleting in other branches is also a change that needs to be merged

You can recover those files after merging:

$ git checkout (含有想恢复的文件的commit) -- (想恢复的文件1的路径) (想恢复的文件2的路径)
$ git commit
黄舟

Thank you! ! !

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