So, I've been using git professionally on a daily basis the past ~13 years.<p>Today I was reminded of a specific way you can blow your leg off, not watching the road while driving.. or the terminal while typing!<p>I guess the server was slow today.<p><pre><code> ~/code/
$ git clone --recurse-submodules git@code.corp:project/project.git
Cloning into 'project'...
remote: Enumerating objects: 10978, done.
remote: Counting objects: 100% (10978/10978), done.
remote: Compressing objects: 100% (3151/3151), done.
^Cceiving objects: 50% (1576/3152), 83.91 MiB | 41.93 MiB/s
~/code/
$ rm -Rf pr[tab]
$ rm -Rf project_modules[enter]
</code></pre>
So I start checking out the repository, realize that I don't wanna do tha anyway and ctrl+c / rm -R pro[tab] (since project_modules is the only other folder that'd complete this, and it'd match project first..)<p>Well, this time, git had either not created the project directory yet, or it managed to clean it up when I aborted, so my expansion went a bit wrong.<p>This wouldn't have happened if I'd have looked at the terminal and read both what I typed AND what the software printed back, but I didn't because youtube started playing a song I'd not heard before (it was Tessa Violet - Haze), so I was looking at the other display just as I realized I didn't wanna check out that repo anyway, and did the [enter] part of "rm -R pro[tab][enter]" just about the same time my eyes jumped back to the terminal, so it took a second or two before I realized what I'd done.<p>Now, my leg is not blown off too bad, my home partition is on zfs and it takes 8 snapshots per day, but it COULD have been blown off somewhat.<p>Drive carefully.