SourceTree git apply失败,代码为1-索引中不存在文件

Cly*_*yky 6 git atlassian-sourcetree

我正在使用SourceTree作为git GUI客户端。今天,我从存储库中撤回了提交,但是我得到了一条警告消息,因为其中一个文件与本地存储库中的同一文件存在冲突。

我尝试通过选择要保留的行然后单击来手动解决冲突Stage lines,但是我收到了以下错误消息: 错误信息

的内容LastFailedPatch.txt是:

diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
--- a/app/src/main/res/values/strings.xml   
+++ b/app/src/main/res/values/strings.xml   
@@ -49,5 +49,11 @@
         <item quantity="many">Certifications</item>
     </plurals>
     <string name="title_activity_chat">ChatActivity</string>
+
+    <!-- Intent bundle keys -->
+
+    <string name="intent_key_user">User</string>
+
+
     <string name="title_activity_chat_menu">ChatMenuActivity</string>
 </resources>
Run Code Online (Sandbox Code Playgroud)

我试图Ignore whitespace在SourceTree中选择选项,但是没有用。

Neu*_*ron 0

对我来说,一旦我将选项设置回“显示空白”,如本答案中所述,问题就解决了。

尽管这似乎只是一小部分人的解决方案。

我在 Windows 上使用 Sourcetree。