24
Finally got why people use Git branches after messing up my whole project file
I was just coding straight on main for 3 weeks and when I tried to add a new feature everything broke at once, took me 4 hours to undo my own mess. Has anyone else learned this lesson the hard way or am I just slow lol
2 comments
Log in to join the discussion
Log In2 Comments
murphy.barbara15d ago
Damn that's rough lol. What nobody talks about is how branches actually force you to make smaller, safer commits because you're not scared of breaking everything at once. When I finally started branching I found myself committing way more often since I knew I could just delete the whole branch if I screwed up. It's like having a safety net that actually makes you braver with your code changes.
9
wyattrobinson15d ago
Murphy.barbara nailed it with the safety net thing. I actually started rebasing more aggressively once I realized I could just squash everything before merging and the branch history didn't matter at all.
9