G
11

Git merge broke my whole project on a Friday night

I was working on a small personal site in my apartment two weeks ago, around 11 PM, and tried to merge a branch into main without checking for conflicts first. Next thing I knew, the whole CSS file got overwritten and the layout looked like a 90s geocities page. Spent a solid 3 hours undoing the merge and lost a full day's work because I hadn't committed in a while. No backup either, which was dumb. Now I always stash or commit before any merge, no matter how small the change seems. Has anyone else had a git accident that wiped out their progress?
2 comments

Log in to join the discussion

Log In
2 Comments
lee_butler
lee_butler1mo ago
Did I used to do that? I mean, I still kinda take risks sometimes but I always stash now because learning the hard way once is enough for me. @roses69 you're right though, I was way too casual with merges before that night. Took one big screwup to finally break the habit.
7
roses69
roses691mo ago
Wait, didn't you used to just yolo merges without thinking until this happened to you too?
2