DEV Community

A poll on git commands Usage

Krishna Damaraju on July 17, 2018

Its always good to see the charts and bars of the tech surveys. They inspire and motivate me to learn new things and gives an overview of what deve...
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
 
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.

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
 
moopet profile image
Ben Sinclair • Edited

I found this survey very confusing!

Firstly, it was asking about the frequency of using commands, but the options were only checkboxes or radio buttons. I answered as if the question was "do you regularly use" but it could as easily have been "have you ever used" or "do you use most frequently".

Secondly some things with checkboxes sounded mutually exclusive, such as

Do you prefer to use if git has combo commands (Like a command to add and commit selected files at once)?

which has checkboxes for both yes and no. I checked both, because I use such combo commands for some purposes and prefer explicit separate commands for others, but I feel that might not be how you will interpret the results.

If not Terminal, How else do you use git ?

has radio buttons. What if I use git in more than one way?

Why are some commands, like log, in there more than once? They're in separate sections, but will their results be aggregated? Will me selecting log in more than one place skew the results?

I found out how it was being aggregated (or not) after completing the survey, meaning I didn't know what I didn't know.

As others have said, could you remove the name/email address section from the results?

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju

Thanks Ben for pointing out these small mistakes. I fixed all of them except repetitive commands like log, diff.. though they are same commands but Listing them under the specific operation gives more detailed info on what cases people are using them.

Collapse
 
stargator profile image
Stargator

@Sarath Damaraju Please PM ASAP. I did not realize my email address would be public

Collapse
 
pmcgowan profile image
p-mcgowan • Edited

I agree - this should be right before the survey link or in the survey itself.

Pro-tip: 1000s of fake emails :)

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju • Edited

Totally agree, but the reason behind collecting email was to update the participants about the survey. I have to find an other way now I guess. 😅

Collapse
 
stargator profile image
Stargator

@sarathsantoshdamaraju I want you to DM me so hopefully you can remove my email address from the list.

Collapse
 
sarathsantoshdamaraju profile image
Krishna Damaraju • Edited

Hey @stargator , I have removed the email fields completely from the form.

I must have over looked it, sorry for the trouble. 😅

Collapse
 
stargator profile image
Stargator

Single Best article I read: atlassian.com/git/tutorials/rewrit...

Once I understood that, it made me understand Git a lot!