T
4

Why does nobody talk about how confusing Git branches can be for new learners?

I spent three hours last Tuesday trying to merge branches in a practice project and just kept breaking everything. I thought I understood the concept from a tutorial, but when I actually tried it with my own code, nothing worked right. Turned out I was on the wrong branch the whole time and accidentally overwrote my main file. A guy in a coding meetup in Austin explained it to me with a whiteboard drawing of a tree, and it finally clicked. Has anyone else had a moment where a simple explanation made a tough concept fall into place?
2 comments

Log in to join the discussion

Log In
2 Comments
harris.emma
My first attempt at merging took four attempts and I somehow ended up with 47 files in a folder I didn't even know existed. My friend joked that I was building a parallel universe not a project. It clicked for me when someone drew a simple diagram with two lines and said "just think of it like version saves in a video game but way more annoying." Now I still mess up sometimes but at least I keep my main branch locked down like my phone on Saturday night.
2
brian_kelly91
The parallel universe joke hit me hard honestly. I spent a whole weekend once trying to fix a merge and my folder looked like a mess, files everywhere and I still don't know where half of them came from. The video game save thing is actually spot on, but really annoying is the understatement of the year. Locking down the main branch is the only thing that saved my ass too, otherwise I would've pushed something broken and blamed it on the dog. Glad I'm not the only one who learns by making a total disaster first.
6