5 ms·
Hmmm...rm -fr .git Now what?
by unbanned 5y ago
Hmmm...rm -fr .git
Now what?
- jdavis703 5y agoI use Time Machine on an external drive. I learned this lesson the hard way… Obviously it’s not perfect, but you aren’t going to lose an entire days work.
- remram 5y agoThis has happened to me unfortunately and didn't feel good at all. I ran `rclone sync` on the folder that had .git instead of the correct subdirectory, and that removed files not present in the source with confirmation (like rsync --delete-after). I've learned to commit and push to a remote frequently (which is easy with Git because you can use any machine you can SSH).
- remram 5y ago*without confirmation
- qbasic_forever 5y agoNothing protects against rm -rf by design. You shouldn't use it to blindly clean up and delete files (unless as a last resort or some very specific and careful use case). Just use plain old rm and feed it the explicit list of files to delete, which forces you to actually look at what you're about to do.
- kazinator 5y ago> Nothing protects against rm -rf by design You mean, other than backups? Including editor backups, in a separate directory.
- quickthrower2 5y agoYou need something to monitor your files and back them up. Backblaze would do it.