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
  • 3,785
  • 3
  • 14
  • 45
  • 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
  • 26,375
  • 3
  • 36
  • 60