1

I've made a git commit that I haven't pushed yet, but I would like to remove the commit, but keep the changes to my file. How do I do that?

Serket
  • 2,769
  • 2
  • 11
  • 32
  • Does this answer your question? [How can I remove a commit on GitHub?](https://stackoverflow.com/questions/448919/how-can-i-remove-a-commit-on-github) – Rahul Bhobe Aug 22 '20 at 00:55

1 Answers1

2

like this

git reset --soft HEAD~1
git reset .
eftshift0
  • 20,217
  • 3
  • 33
  • 45