121
submitted 1 week ago by mat@jlai.lu to c/programmerhumor@lemmy.ml

As the title says. I put the wrong value inside a clean up code and I wiped everything. I did not push any important work. I just want to cry but at least I can offer it to you.

Do not hesitate to push even if your project is in a broken state.

you are viewing a single comment's thread
view the rest of the comments
[-] mormegil@programming.dev 1 points 1 week ago

I wanted to publish a tiny utility I created to GitHub (you know, it might be useful to someone else...). Before that, I wanted to some cleanup, rebasing/squashing a bit, etc. In the middle of that:

$ git checkout featurebranch
The following untracked working tree files would be overwritten by checkout:
.gitignore
.idea/…
etc...

Oh, sure, no problem…

$ rm -rf * .*
$ git checkout featurebranch
fatal: not a git repository (or any of the parent directories): .git

D’oh! (Never mind, it probably wouldn't have been useful to anyone else, anyway.)

this post was submitted on 03 Jul 2025
121 points (94.8% liked)

Programmer Humor

37204 readers
922 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS