Concepts, Tips, & Tricks

Git Concepts

Distributed

Trees

Immutability

Rebase

Interactive Rebase

Making it Simple to

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 & friends)

Properly Manage Releases

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

GitHub

Keyboard

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

Git Concepts, Tips & Tricks (2017)

By Brian Dukes

Git Concepts, Tips & Tricks (2017)

Whether you're working on a team of a dozen developers or creating DNN extensions by yourself, making effective use of source control can make a huge difference in the productivity of your workflow. This session will cover methods for getting the most out of Git to manage your source code, making it simpler to pick up where you left off, to keep in sync with your project's collaborators (including yourself on multiple computers), to avoid lost changes, and to properly manage releases of your code.

  • 1,875