Getting good with git

By Glenn Sarti

Elevator Pitch

Git is becoming the preferred, source control system for PowerShell but the learning curve looks more like an imposing cliff.

In this talk I’ll start with what git is, some handy tools to use, and then look at some development practices to get good with git

Description

Git is a wonderful source control tool but it can be be pretty hard to implement and learn.

Topics:

What is DVCS and git?

How do I start with git

  • Installing git
  • Local computer with git init
  • A simple file share
  • Hosted git systems (e.g. VSTS, github and gitlab)
  • Self hosted git systems (e.g. gitlab)

The basics

  • Dissecting a commit - What is this beast?
  • Staging vs commiting
  • What is a Pull Request? Why not a Push request
  • PowerShell specific tools to help

The not-so basics

  • What is a merge commit
  • Staging hunks
  • Rebasing
    • Reorder
    • Squash/fix/drop
  • PR or feature branch?
  • git bisect

Good practices

  • Commit messages
  • Commit Size
  • Cleaning history
  • Rebase, not merge (Clean History)
  • PR Etiquette as a contributor
  • PR Etiquette as a maintainer

Git workflows

  • Single branch?
  • Fork or no fork?
  • Squash or no squash

Further information

  • Links etc.

Notes

Git is commonly used in the PowerShell community but we don’t talk about it much. This talk will aim to bring people up to speed quickly on the basics, which then sets a good foundation for the not-so basic tasks like rebasing.

Once we know how the tool works, then we can move to how to best use it to make our and other people’s lives easier.

There is a lot of prior art out there so it will be easy to demo and show git and powershell in action.