TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Tell HN: Look Where You're Driving

6 pointsby dusted4 months ago
So, I&#x27;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> ~&#x2F;code&#x2F; $ git clone --recurse-submodules git@code.corp:project&#x2F;project.git Cloning into &#x27;project&#x27;... remote: Enumerating objects: 10978, done. remote: Counting objects: 100% (10978&#x2F;10978), done. remote: Compressing objects: 100% (3151&#x2F;3151), done. ^Cceiving objects: 50% (1576&#x2F;3152), 83.91 MiB | 41.93 MiB&#x2F;s ~&#x2F;code&#x2F; $ rm -Rf pr[tab] $ rm -Rf project_modules[enter] </code></pre> So I start checking out the repository, realize that I don&#x27;t wanna do tha anyway and ctrl+c &#x2F; rm -R pro[tab] (since project_modules is the only other folder that&#x27;d complete this, and it&#x27;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&#x27;t have happened if I&#x27;d have looked at the terminal and read both what I typed AND what the software printed back, but I didn&#x27;t because youtube started playing a song I&#x27;d not heard before (it was Tessa Violet - Haze), so I was looking at the other display just as I realized I didn&#x27;t wanna check out that repo anyway, and did the [enter] part of &quot;rm -R pro[tab][enter]&quot; just about the same time my eyes jumped back to the terminal, so it took a second or two before I realized what I&#x27;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.

no comments

no comments