Git commands for every occasion!, by Hilary Stohs-Krause

Abstract

Feel like you just don’t “git” it, or looking to up your “git” game? This is the talk for you! We’ll start with the basics, then work our way up to useful commands for debugging and correcting issues, all the while exploring different variations of specific commands.

While aimed at new kids on the git block, even command line connoisseurs can probably pick up a few tricks. There’s more than one way to “git” things done, so let’s “git” together!

Notes

I’m a senior developer who’s been programming professionally for nine years, using git via the command line.

When you’re first starting out in programming, you often learn the basic commands, and maybe some specific ones your team likes to use.

However, it can be easy to rely on the same ones over and over and not realize the different ways you can customize your git experience, like using the myriad flags and options available. (For example, while researching for this talk, I learned some common workarounds I do could easily be replaced with a flag I didn’t know existed!).

This talk is intended to be fun, casual and informative, focused on folks who have some familiarity with git, but haven’t yet done a deep dive.

Outline

  1. What actually IS git?
  • Brief history
  • Why we use version control

This section is mostly about the big picture - I've worked with several junior developers who came with a strong command of individual commands, but struggled to explain how everything to fit together and what was happening behind-the-scenes. Especially for newer programmers, hearing what can go wrong without version control can also help it feel more pertinent and valuable / worth learning.

  1. Fundamentals

This section is for making sure we’re all on the same page regarding the most basic commands, and also shares options and flags that can be useful additions for them:

  • clone
  • merge
  • add
  • commit
  • push
  1. Core Commands

In this section, we’ll look at a set of core commands just beyond the fundamentals, and walk through 2 to 3 variations for each:

  • diff
  • log
  • shortlog
  • reflog
  • rebase
  • stash
  • remote prune origin
  • clean
  1. Debugging and Undoing

This section looks at commands that are particularly useful for fixing or finding problems, again exploring 2 to 4 variations for each, and sharing real-world examples of when they’re useful:

  • revert
  • reset
  • cherry-pick
  • show
  • bisect
  1. Audience discussion
  • Favorite commands and why
  • Any tips or tricks they use to make git easier

Edit proposal

Submissions

NDC Oslo 2024 - Rejected [Edit]

That Conference 2023 - Accepted [Edit]

Add submission