You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.
Can you give some more details about the file you're trying to do this on? This functionality works in all my tests here.