After pushing my code to the remote branch and creating a PR. I wanted to make some more changes to my code and then commit to the remote branch again
First, I started these steps:
git add .
git commit -m "Remove semicolons, change to multi line returns"`
But then this appeared right after the commit:
I checked the status and unstage all the added files
git status
git restore --stage .
-> Then I add and commit again, the error is still there.
After that, I undo the commits & pull the branch to start again
git reset HEAD^
git pull
When I'm done making changes to the code, I ran git diff
to see the changes I've made.
Finally, I ran git add .
& git commit -m "Recommit message"
, but somehow the error came back
Can anyone help me with what actually happened and how can I fix it?
If we can't fix it, is there any way to revert the code to normal?
Thank you!