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 Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
We're bringing product updates and pro tips on teamwork to ten cities around the world.Save your spot