I accidentally run the command "git clean -df", so I lost many directories and files, I want to recover them, I don't have backup in time machine. I tried some software to recover, but they don't work.
How to recover files from command “git clean -df”
gitrecovery
Related Question
- Git auto-complete for *branches* at the command line
- How to show git files in Finder
- My Automator Workflow fails because it fails to find the git command within the ‘Run Shell Script’ command? Need help
- Does installing Command Line Tools for Xcode also install Git
- MacOS – I accidentally removed way too many files with `rm -rf`. Anyway to recover
- MacOS – Accidentally deleted files using GNU find -delete – how to recover
- How to uninstall Git from the command shell
Best Answer
If you are working with an online repository and you keep it up-to-date you can download all the file from the online repository using the following commands:
Using these commands you'll be able to restore your deleted files, obviously only if the online repository is up to date.