When Git Can Be Shit

banner image

Why? I'll get to that in moment.

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:

  1. Determine which unnecessary Git skills you'll probably want to avoid (at least for now).
  2. 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:

  1. Efficiently staging, committing and pushing a commit with a tool such as VSCode, in a streamlined fashion.

  2. 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.

  3. Using an effective, visual tool that provides ease of reviewing pull requests.

Git Skills and Concepts That Are Essential to Learn

  1. Why use Git
  2. Understanding common Git workflows
  3. Versioning
  4. Branching
  5. Merging
  6. Commit vs Push
  7. 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.

  1. Resolving merge conflicts using a CLI.
  2. Working with a branching strategy or squash policy that doesn't make sense or is ineffective for you or your team.
  3. Dealing with unenforced shitty commit messages that others on your team may make.
  4. Regressions that are introduced by accepting messy merge results.
  5. Needing to revert commits due to a mistaken branch merge.
  6. Needing to cherry pick commits for any situation.

Git Features You Can Avoid For Now

  1. Reviewing Pull Requests
  2. Resolving complex merge conflicts on your own
  3. Reverting changes
  4. rebase
  5. amend
  6. tag

Git Features You Can Avoid Indefinitely

  1. grep
  2. bisect
  3. 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:

  1. Commit message format.
  2. Commit message formats that are enforced (i.e. prevents a commit or a push if it does not conform).
  3. Branching strategy.
  4. Which branch protections are in place.
  5. Which client and/or server side (pipeline) checks are run against the code pushed/being pushed to ensure quality (formatting, breakages, etc)
  6. Designated tech lead that can assist when Git issues arise for newcomers.

When Git Can be Shit

  1. Commits that are too large.
  2. Commits that conflate multiple updates and cannot be cleanly reverted.
  3. Messing up something that was already committed or pushed and needing to fix it using a CLI.
  4. Not having clear or effective team norms or consensus on how to leverage Git.
  5. When working with complex branches, not having an effectively way to visualize them.
  6. Dealing with complex merge conflicts.
  7. Long lists of commits that have messages that do not make sense or are unnecessary.
  8. Not being able to easily or cleanly roll back a commit.
  9. Fixing introduced regressions.
  10. 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.