84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
现在我有两个分支master和dev。在master上有十个文件,在dev上有9个文件,这8个文件都是和master上的文件是一样的。现在我修改dev上的8个文件内容,然后切换到master分支上将dev的内容merge过来,之后我的master分支上那2个文件也跟着消失了,master就完全成了dev分支了。但是我还是想要那两个文件的。这种问题应该怎么处理呢?感激帮助%%
欢迎选择我的课程,让我们一起见证您的进步~~
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! ! !
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:
Thank you! ! !