Teacher's Manual
  • Introduction
  • Answering Questions on Piazza
  • Notable questions
  • Chesterton's Fence
  • Docker Essentials
  • Notes on curriculum design
  • Notes on presenting
  • Pair Teaching
  • Eliciting Questions During Class
  • Office Hours
  • Open Office Hours
  • How To Write Tests
  • Beginner-friendly Code Style Guide
  • rails grade
  • Audit Requests
  • Setting Up Canvas
  • Setting Up GitHub
  • Preparing for Day 1
  • Syllabus
  • How To Create A Project
  • How To Setup an LTI Assignment
  • LTI Tools
    • Grades
  • Possible Format For Lecture Notes
  • Configuring Cloud9
  • Projects Checklist
    • AD1 HW Checklist
    • AD1 Gitpod Extensions and Settings
    • AD2 HW Checklist
    • Adding Dependencies to a Project
    • Adding Specs to a README
    • Updating Gitpod Docker Image
    • Updating Old Projects Checklist
  • Integrating GitHub with Slack
  • Mastering Git
  • Class Recordings
  • How to update Youcanbook.me
  • Swag
Powered by GitBook
On this page

Mastering Git

PreviousIntegrating GitHub with SlackNextClass Recordings

Last updated 5 years ago

Git is for so much more than just . It also enables incredibly powerful workflows that, above all, encourage conversation. These conversations turn into feedback, knowledge sharing, documentation, and all sorts of wonderful things.

When you're ready to level up, thoughtbot has a wonderful course on Git: . Here's how to approach it:

  • I found playing the visual game to be helpful as a warm-up.

  • Do the following episodes:

    • Getting to Confident

    • Managing History

    • Undoing

    • Crafting History with Rebase

    • (skip Git Object Model for now)

    • (skip Object Model Operations for now)

    • Customizing Git

    • GitHub and Remotes

    • (skip Vim and Git for now, or forever if you are not a Vim user)

    • And most importantly, thoughtbot's Git Flow. This is what we'll use for all development beyond the very initial tiny spike to get a project off the ground.

      As soon as possible, we'll switch to this branch/PR/code-review/rebase/squash/merge workflow for all changes, no matter how small.

      A refinement to thoughtbot's Git Flow: GitHub introduced after the Mastering Git course was written. Neat!

  • It's very important to read their PR Authoring Tips.

  • Here are some resources on what good commit messages look like (this is for the final, squashed commit; not the work-in-progress commits; don't worry about those):

  • Also watch , and Derek's talk on .

After using and, more importantly, observing teammates using the flow for around a month,

  • Come back and start over from Getting to Confident. It will make more sense and sink in deeper this time.

  • Now for the fun part — do the Git Object Model and Object Model Operations episodes. After you've been using Git for a while, and then you finally peek under the hood and realize how simple it is conceptually (underneath it's terrible, terrible CLI), it's a very empowering experience.

    As an exercise, I recommend building your own super-simple git-like version control system in Ruby after doing these two episodes. Initially just make it so that all you can do is create commits, and then checkout commits. Then you can add branching, tagging, etc.

  • Glance through the resources in Learning More and dive into whatever piques your interest. There are a lot of resources/opinions now, many are more recent than the ones given there:

never losing work
Mastering Git
Learn Git Branching
Draft Pull Requests
https://chris.beams.io/posts/git-commit/
https://juffalow.com/other/write-good-git-commit-message
Joe and Ben walk through a code review
Code Review Culture
What HN is saying about 'code review'...
What HN is saying about 'commit message'...
What HN is saying about 'pull request'...