'git apply' failed with code 1: patch does not apply error in SourceTree on Stage Hunk [duplicate]
Asked Answered
P

1

16

When I attempt to stage a hunk or some lines, I get the following error in SourceTree on OS X:

git apply failed with code 1 patch failed

Staging entire files works fine. The path of this repo lives on a Windows virtual machine running in Parallels.

I suspect a whitespace or newline issue. How do I make this work without reverting to hg-git?

Perfunctory answered 15/2, 2017 at 1:28 Comment(1)
same here. Arrives 'from time to time' without a rule. OSX 10.12.5 with Xcode 8.3Jannet
S
5

I changed the setting back to 'Show Whitespace' and things seem better.

Sendai answered 10/7, 2017 at 17:32 Comment(3)
Actually, the fix for me was the opposite: setting it to 'Ignore whitespace' would solve the patching issue.Faith
Doesn't fix the issue for me, neither option.Forbis
This fixed it for me today. 4 years after both the question and answer... Great job AtlassianProteus

© 2022 - 2024 — McMap. All rights reserved.