Psst: I've started to work on a new Git micro-course, "Do Shit with Git". If you're interested, email me at hello@seenickcode.com to get on the wait list.
I'm writing this article because looks like lots of people who've responded to our survey sent in our Sign Up welcome email, among other things, want a course on Git.
I can understand why! You absolutely should learn Git. A VCS (Version Control System) is essential to writing code these days and Git is by far the most popular.
So if you're one of these people, I think that it may help you to understand the qualms I have with this tool, so that you can:
Determine which unnecessary Git skills you'll probably want to avoid (at least for now).
Determine which essential Git features will probably be a pain to learn.
So allow me to break down some of these below so you can understand which are essential and learn them as efficiently as possible, getting the pain out of the way quickly. Treat it as eating your vegetables when you were a small child. Just get it over with!
Git Workflows That Are Not Shitty
Workflows that you must absolutely learn as fast as possible:
Efficiently staging, committing and pushing a commit with a tool such as VSCode, in a streamlined fashion.
Reviewing the diff of changes you plan to push, again, using a handy tool such as VSCode, to carefully check what you will be pushing.
Using an effective, visual tool that provides ease of reviewing pull requests.
Git Skills and Concepts That Are Essential to Learn
Why use Git
Understanding common Git workflows
Versioning
Branching
Merging
Commit vs Push
Crafting effective and clear commit messages
Git Workflows That Are For Sure Shitty
Workflows and situations where working with Git can become a pain in the tuchus.
Resolving merge conflicts using a CLI.
Working with a branching strategy or squash policy that doesn't make sense or is ineffective for you or your team.
Dealing with unenforced shitty commit messages that others on your team may make.
Regressions that are introduced by accepting messy merge results.
Needing to revert commits due to a mistaken branch merge.
Needing to cherry pick commits for any situation.
Git Features You Can Avoid For Now
Reviewing Pull Requests
Resolving complex merge conflicts on your own
Reverting changes
rebase
amend
tag
Git Features You Can Avoid Indefinitely
grep
bisect
reflog
What You Should Do If You On a New Team
Especially for small startups or teams in larger, disorganized organizations, and especially if you're still learning Git, you'll want to first ensure and advocate for, a clear set of norms your team has agreed upon regarding:
Commit message format.
Commit message formats that are enforced (i.e. prevents a commit or a push if it does not conform).
Branching strategy.
Which branch protections are in place.
Which client and/or server side (pipeline) checks are run against the code pushed/being pushed to ensure quality (formatting, breakages, etc)
Designated tech lead that can assist when Git issues arise for newcomers.
When Git Can be Shit
Commits that are too large.
Commits that conflate multiple updates and cannot be cleanly reverted.
Messing up something that was already committed or pushed and needing to fix it using a CLI.
Not having clear or effective team norms or consensus on how to leverage Git.
When working with complex branches, not having an effectively way to visualize them.
Dealing with complex merge conflicts.
Long lists of commits that have messages that do not make sense or are unnecessary.
Not being able to easily or cleanly roll back a commit.
Fixing introduced regressions.
Generally attempting to do complex tasks using a CLI (personal opinion).
Is There a Better Alternative?
Not really.
Just learn Git well enough to do 95% of your day to day work and work with your team smoothly, oh, and have someone you can reach out to when you are stuck. 🙂
What Next?
I've started to work on a new Git micro-course, "Do Shit with Git".
If you're interested, email me at hello@seenickcode.com to get on the wait list.