I had accidentally pushed my commits with wrong line endings (CRLF instead LF) . Is it possible to roll it back and send once more with right line endings. Because pull request is a mess now.
You can amend the last commit by running git commit --amend
instead of git commit
. This will not create a new commit but add the staged changes to the last commit.
Note that this will rewrite the previous commit, resulting in the same effect as when rebasing. The resulting Git commit object will be different than the previous one, and everyone who depends on that object will have problems. – In general, you shouldn’t rewrite commits once they have been published.
In your case though, as you are making a pull request, you can do it, and it’s also often expected to improve your commits by rebasing until they are accepted in the pull request.