naonintendois@programming.devtoLinux@lemmy.ml•Stupid things you've done that broke your Linux installation
·
8 months agoI was newish to Linux and had just run rm -rf ./.*
to remove all the hidden files/dirs in a directory. I then wanted to run rm -rf ./*
to clear the rest, but I accidentally ran rm -rf . /*
. By the time I noticed it was taking too long and hit Ctrl+C, it was too late.
You should also check out
git commit --fixup ...
paired withgit rebase -i --autosquash ...
. you specify a commit target to the fixup to say you want to fix that commit with the code you're currently committing. It will create a fixup commit at HEAD. The auto squash will reorder your fixup commit and mark it as a squash so you have way less work to do.