I messed up and actually push a git repo to the url of another one of my repos. I am trying to undo this but am having trouble and I haven't used 'git reset' before.
Say the hash of the last good commit was 12345. I tried doing git reset --hard 12345
which seemed to succeed without error but for some reason it did not change my local files. My local working directory still contains all of the files that were accidentally pushed. How do I revert them?
Are these untracked files? You can remove these by doing:
git clean -f -d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With