Git repos have lots of write protected files in the .git
directory, sometimes hundreds, and the default rm my_project_managed_by_git
will prompt before deleting each write protected file. So, to actually delete my project I have to do rm -rf my_project_managed_by_git
.
Using rm -rf
scares me. Is there a reasonable way to delete git repos without it?
If you’re making backups of things you care about and not running
sudo rm -rf
the command isn’t really dangerous.But +1 for having it in /tmp I have a bash function I call tempd that is basically
cd $(mktemp -d)
I use it so much for stuff I dont really care to keep.Never heard of mktemp before, that’s need. Come to think of it I never thought about how /tmp is really used by the system in the first place, time to do do studying I guess