Do developers know how to use Git commands? A large-scale study
dl.acm.org
dl.acm.org
Below is a summary of the paper:
Purpose
This work is motivated by the need to understand the problems and difficulties that developers encounter in using Git commands.
Introduction
- We (the researchers) analyzed 80,370 questions from Stack Overflow (SO) about Git. We identified the Git commands frequently associated with difficult questions.
- We also surveyed 92 developers with experience of using Git commands both from academia and industry (qualitative survey).
- Git comes with a disputed and discussed issue about whether it is easy to learn.
- Some developers say Git is difficult to learn; Git commands are often used, but not fully understood.
- Three of the top-five questions on SO are about Git commands. The top question, “How do I undo the most recent local commits in Git,” has more than 22k votes and 9m views. This suggests there is some confusion about the use of Git commands.
Popularity of Git-related questions
There are 80,000 Git command-related questions on Stack Overflow from 2008 to 2020. The percentage of Git command-related questions and questioners has remained relatively stable. Meanwhile, Git command-related questions on Stack Overflow have higher average numbers of views, favorites, and scores.
Do Git questions come from novices or experienced developers?
Many Git questions are asked by developers who have been registered on Stack Overflow for a long time. After 2017, about 40% of the questioners of Git command-related questions had been registered for more than four years at the time of asking the questions, compared to that over 50% of all questioners on Stack Overflow had been registered for less than 2 years.
This suggests that even developers with years of development experience can have trouble using Git commands.
What Git commands are more popular among the questions asked by developers?
Git commands (e.g., git revert and git reflog) about recovery are among the most popular commands asked, followed by supporting Git commands (e.g., git clean and git help), and commands for branching and conflict resolution (e.g., git mergetool and git branch). Git commands are often used in combination to fulfill tasks.
Command difficulty
In terms of the percentage of questions with no accepted answers, some of the seldom used Git commands (e.g., git pack-redundant and git http-push) are ranked high.
Commands that are asked in quite a number of questions with low percentages of accepted answers (e.g., git credential and git submodule) tend to be those can be used in complex scenarios.
How do developers learn to use Git commands? (Responses from qualitative survey)
Most respondents (from both the academia and the industry) considered their expertise level of using Git commands to be only advanced beginner or competent. A vast majority (81.7%) of all the learning approaches used by our respondents were self-learning (i.e., from the internet and the documentation). Many respondents stressed the importance of understanding Git basic concepts and principles first.