7
eeee
7y

If your project gets fucked up beyond repair, for example by your IDE (I'm looking at you, Android Studio) try this:

0. Backup any ignored but essential files in your project (e.g. secrets) outside of your project directory.
1. Close your IDE.
2. git clean -xdf
3. Restore any backed up local files.
4. Reopen the project as a new one in your IDE.

This is awesome, because it cleans up everything non git and not committed. So any local project files configured by your IDE will be nuked, which allows for a clean start. Also, all your locally committed work is preserved.

BTW, if you really need to start over (even with git), then just remove all the things an clone the remote repo again.

Comments
Add Comment