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?
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