0

I am working on a large project with a make file that generates tons of files. I accidentally pushed to my repo without doing make clean first, and continued to push to the repo without realizing what I had done. I was wondering if there was a way to remove all files on a repo that are not in my local as well.

  • https://stackoverflow.com/questions/9050914/how-can-i-remove-all-files-in-my-git-repo-and-update-push-from-my-local-git-repo – Jesse Jun 26 '19 at 17:55
  • Be warned **not to run** `git rm -r *` like in an answer at the linked question — it will remove all your local files, modified or not. – phd Jun 26 '19 at 18:43
  • You may checkout your repo into a new folder with the state before the files were pushed ... and then you forcepush it to the repo and then push your new changes without the generated files again. – YesThatIsMyName Jun 27 '19 at 06:47

0 Answers0