在处理一些未提交的文件时,我需要拉取新的代码。但是出现了冲突,所以 Git 拒绝了拉取:
处理未提交文件时,拉取新代码出现冲突,Git 拒绝拉取:
error: Your local changes to the following files would be overwritten by merge:
...
Please, commit your changes or stash them before you can merge.
问题1:我如何在保留未提交更改的情况下pull并merge?我需要继续工作,但我还没有准备好commit,但我想要外部代码?
问题2:我最终使用了stash
,然后是pull
。现在我该如何将我的更改合并到新的pull中?如何应用我的stash而不覆盖pull的新更改?