What are some effective precautions to ensure that unresponsive local files are not deleted?
Do not use commands that delete files :-).
Seriously: there is no special protection in git for irreproducible files, but git usually tries very hard not to lose any data unless you explicitly report it.
Even the most dangerous commands (for example, git reset --hard , git checkout -- file ) will not touch unaffected files. The only dangerous commands are (AFAIK):
git stash -u (as you found out)git clean
In addition, I found that it is better to never have valuable data in files without a trace. If this is important, it needs to be checked. Only ejected data and generated files should be .gitignored.
Regarding the configuration of Eclipse: perhaps it is best to have some kind of tool for its auto-generation (or Eclipse generates it yourself through detection). Then you can safely .gitignore it and re-create it if lost.
source share