When I try to stage or unstage part of a file using the Stage Hunk or Stage Selected Lines button I get the following error:
'git apply' failed with code 1:'error: (null): does not exist in index
The last single quote appears on its own line.
I have tried running 'git fsck' on the repo and didn't get anything unusual.
Follow up, this is fixable by setting Show Whitespace to Ignore Whitespace. Then the apply works. It appears that some of the time the line numbers from whitespace changes affects things negatively. This doesn't always happen, but at least for me this time it fixed it. Hope it helps someone else! :)
This thread is quite old, but I just wanted to stop in and say I still see this issue.
Gotta be line-ending-related; I'm attempting to stage hunks/selected lines on a Windows machine after the source files were last modified on a Unix machine.
Very irritating issue, and none of the fixes in this thread worked for me.
Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events