Skip to content

Instantly share code, notes, and snippets.

@joshfreemanIO
Last active August 29, 2015 14:21
Show Gist options
  • Save joshfreemanIO/e9689dff0c1fe29c5ba1 to your computer and use it in GitHub Desktop.
Save joshfreemanIO/e9689dff0c1fe29c5ba1 to your computer and use it in GitHub Desktop.
Git for Teams/Git as a Communication Tool

Git for Teams

  • Self Introduction
  • Interrupt if you have questions!

Purpose of Git

  • Source Code Version Control
    • Historical record of changes
    • Source Distribution
  • Communication
    • To your team
    • To your future self
    • To the team maintaining this project long after you have gone
    • git log -p
    • git blame

Richer Commit Messages

  • Stop running git commit -m
  • A useful commit message:
    • A summary, written impertively and no longer than 50 characters
    • A detailed message, each line no longer than 72 characters
      • Why is this change necessary?
      • How does this address the issue?
      • What side effects does this change have?
      • References and resources

Staging Changes in Patches

  • Commit logically-related changes together
  • git add --patch

How Do I Make This Magic Happen?

Create a commit template ~/.gitcomittemplate



# Why is this change necessary?

# How does it address the issue?

# What side effects does this change have?

# References
  • Setup your ~/.gitconfig
  • Set your preferred editor
  • Stop running git commit -m

Feature Branches

  • Use lots of small feature branches
  • At least one branch per ticket

Github Pull Requests

  • Don't make people pull your code
  • Be liberal with images and gifs
  • Add ticket URLs

Code Reviews

  • Do them in person, or over the phone, or when you have a free moment, or just be nice

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment