0

I accidentally committed the wrong files to Git, but I haven't pushed the commit to the server yet.

How can I delete that commit from the local repository?

Dimuthu
  • 417
  • 4
  • 12

1 Answers1

1

Try git-reset https://git-scm.com/docs/git-reset you can reset your state to a previous commit keeping your changes. Something like this should work git reset --soft origin/master

J. Knabenschuh
  • 747
  • 4
  • 15