Concepts, Tips, & Tricks

Git Concepts

Storing History

Other Version Control Systems



The Three StaTes

The Three StaTes

Commit Tree/Graph

Three Commits


Checkout Testing


Checkout Master

Add Tag


Another Branching Example

Three Commits

Create Feature Branch


Switch to Hotfix

Fast-Forward Master

Back to Work


Merge iss53 into master

Merge Commit


Integrate Experiment


Rebase Rewrites C4

Fast-Forward Master

Tips & Tricks

Pick Up Where You Left Off

  • Use branches to separate features
  • Don't be afraid to commit (you don't have to push)

Avoid Lost Changes

  • Don't be afraid to commit
  • Anything that has been committed can be retrieved
  • If necessary, you can use a tool to recover lost commits

Keep Changes in Sync

  • Fetch (don't pull) early & often
  • Use a nice merge tool (consider SemanticMerge)
  • Turn on rerere & autostash
  • Use short-lived feature branches
  • Feel free to abort a merge/rebase and try again (make sure you turn off Gulp/Webpack/etc.)

Properly Manage Releases

  • Use a build server (e.g. TeamCity, AppVeyor, VSTS)
  • Use tags to indicate which commit a release was based on
  • Wait until the actual release to create the tag

Github Keyboard Shortcuts

  • ? — Review these shortcuts
  • T — File finder
  • Y — Canonical URL
  • L — Go to Line

Git Concepts, Tips & Tricks

By Brian Dukes

Git Concepts, Tips & Tricks

You’ve been using Git for a while and know the basic commands, but do you really understand what makes it different than other source control solutions? This presentation will focus on the core concepts within Git, and how embracing those concepts can change how you approach writing software in the first place.

  • 1,681