The importance of mastering Git
Throughout my working experience, I saw that many people lack knowledge of specific Git topics. I’m not saying that everyone should know each command-line option, but an experienced developer should know what Git can do. Things like branching model, merging, and rebasing — at least the concepts — are the kind of tooling that makes a developer's life easier.
A lot of people compare software developers to craftsmen. Craftsmen have a standard to which they hold (check more of this in this Uncle Bob playlist). But another thing I’ve learned throughout my woodworking hobby experiences is: craftsmen know their tools. As a woodworker, you must be diligent about the work, know which tool does what, and how to use it. I will skip the practice makes perfect speech because that applies to everything.
A good woodworker can sculpt almost anything with a chainsaw (check YouTube videos about it, it’s amazing!). In similar ways, a good developer could use Git for change tracking (obvious), code review, build, and deployment. I stress here: use Git, not Gitlab, Bitbucket, or Github. With proper knowledge — and a lot of work — git could replace those platforms' basic functionalities. We should know at least how these tools integrate (mostly through Git Hooks).
A second argument towards learning Git is the following: sometimes (at least for me), learning advanced stuff makes me get so used to the basic stuff that I don’t forget it anymore. The same goes for Git, understanding some advanced topic turn the daily workflow into an easy process, even though it is not as easy as commit to master and push.
Finally, knowing specifics about any tool (in any field) saves time (thus money). Sometimes I spent hours solving a problem, then I realized that the tool which I was using already had automation for that specific task.
Knowing the advanced consolidate the basics. For the folks with an engineering background, nothing like studying differential equations or signal processing to turn differentiation and integration “easy”. Hence, spending a few minutes to learn some Git “dark magic” would also make the daily branch, commit, rebase, push and, merge easier tasks.
I remember that once I helped a colleague with a complicated merge with lots of conflicts (like dozens of files). He was merging two old branches together (the why we leave for another topic). We just changed the normal git merge to:
git merge -s patience
… we (or Git?) reduced the conflicts to less than a dozen files. If you want to understand the patience strategy in-depth, check this: https://blog.jcoglan.com/2017/09/19/the-patience-diff-algorithm
I could give other examples where git bisect or git log with some filtering saved the day. But I will leave those specifics to the specific articles about them.
If you want to learn more about Git, I surely will write more about it. You can also check some sites like https://learngitbranching.js.org/ and https://try.github.io/. If you want to dig in deeper, take some course on Udemy about it.