DEV Community

Discussion on: A poll on git commands Usage

Collapse
 
elarcis profile image
Elarcis • Edited

Single best article I’ve ever read about Git is Understanding Git Conceptually.

Once read, everything just clicked in my head and I finally understood what all these commands did, how to use them intelligently and responsibly, and most of all I was able to understand and fix all of our team’s branching issues that’d take us dozens of minutes to figure out each time they appeared.

Also, and I like that, it doesn’t take you by the hand and tell you “Here are the commands you need, full stop, just don’t do silly stuff and everything will be fine.” It grabs you by the shirt, tells you the hard truth:

“You can only really use Git if you understand how Git works. Merely memorizing which commands you should run at what times will work in the short run, but it’s only a matter of time before you get stuck or, worse, break something.”

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju • Edited

Thanks for sharing @elarcis , I totally agree with you and infact this reminds me of the mistakes that I did initially when I started working with git, with out properly understanding it. And I will read the mentioned docs for sure. Can you take the survey and mention the same article in the Survey too. Ignore if you have already given it. :)

Collapse
 
ferdnyc profile image
Frank Dana • Edited

Agreed. Stack Overflow would occasionally get questions (though it's less common these days) along the lines of, "I worked 5 years at my last job developing code managed in Subversion, but at my new job they use git..." or "We want to move our codebase from [some commercial centralized VC] to Github"..." always ending with "What are the differences between the thing I know and git, and what are the equivalent git commands for the steps/functions/operations I know how to perform in the old system?"

If the person asking that question is unlucky, someone would do them a disservice and answer it as asked. When the only right answer, really, is to explain that git is fundamentally a completely different paradigm from systems like CVS, svn, and the like. The worst way someone can approach git is from the mindset of learning how to apply their centralized-VC patterns with git. They'll be constantly surprised by the results of their actions, constantly confused why things are so much harder and more complicated than they should be, and never even glimpse the true power and beauty of how git is MEANT to work.

New paradigms require new understanding, throwing away everything we think we know and re-learning from the ground up. That's the only way to approach git if you're going to have any hope of eventually understanding it.