-5

My python interpreter setting been deleted by this git clean -d -f so now do i have to reinstall all package requirements?. Is there any way i can undo this.

I was trying to remove _ _ pychache _ _ files. but by mistake typed this git clean -d -f command.

if I had to install all packages again then i would be in big trouble cause of high chances of mismatch module version

  • I'm guessing your question is whether it is possible to undo git clean, so there is this duplicate: https://stackoverflow.com/questions/6267180/can-i-restore-deleted-files-undo-a-git-clean-fdx – Diaco Jun 14 '21 at 07:42
  • what do you mean by your interpreter setting? – juanpa.arrivillaga Jun 14 '21 at 08:00

1 Answers1

1

If the file was private, meaning not added to the index through git add, and not committed, then double-check your editor/IDE: it might still have a local history for that file.

If not, then you need to use a file recovery utility, as detailed in "Can I restore deleted files (undo a git clean -fdx)?".

It is best to have an alias for git clean, in order to delete the (.gitignore'd) __pycache__ while keeping the (.gitignore'd) .iml/.idea project setting files you want to keep during a clean (even an inadvertent one)

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250