Git is about communication

Git is about communication

Git is a way to communicate with your team. Well written commits and Pull Requests ensure that this communication goes smoothly.

Document why you made a change in your git commits. Your team, your future self, and your future colleague will thank you.

Tom de Bruijn

August 21, 2020

Annual Pro sale · Save $30

Have presentations of your own?

Share with private links, password protection, and more control over your work.

Transcript

98 slides
  1. @tombruijn git is not simply $ git add . $

    git commit -m "WIP" $ git push
  2. @tombruijn Hall of Shame • WIP • Fix bug •

    update tests • Move method • closes #123 • ...
  3. @tombruijn This is a commit subject This is a commit

    message that can be much longer than the subject. Here we can explain the change in more detail than we could in the subject of the commit.
  4. @tombruijn How it could be better • git checkout the

    code • Poke around • Try to break it • Check if the tests actually test things
  5. @tombruijn Write down why a change was made Not just

    what was changed That's what the diff is for This is the most important thing!! The MOST important thing!!!
  6. @tombruijn The scenario - Example When X happened... When error

    was raised... I dreamed about refactoring this...
  7. @tombruijn How the problem was solved • What does this

    solution do? • Why this solution?
  8. @tombruijn Development history • WIP • Add button to edit

    user profile • Merge remote-tracking branch 'origin/develop' • Refactor button component • Fix tests ? ? ? ? ? ✅ ✅
  9. @tombruijn • WIP • Add button to edit user profile

    • Merge remote-tracking branch 'origin/develop' • Refactor button component • Fix tests
  10. @tombruijn • pick WIP • fixup Merge remote-tracking branch 'origin/develop'

    • squash Refactor button component • fixup Fix tests • pick Add button to edit user profile • fixup Fix tests
  11. @tombruijn Tidy history • Add button to edit user profile

    • Refactor button component • I now implemented the button twice
  12. @tombruijn • We do this for our team • We

    do this for our future selves
  13. @tombruijn • Commits explain • Why this change was made

    • How it was implemented • What alternatives were considered • Why this solution was better • Small Pull Requests • Tidy git history

More Decks by Tom de Bruijn

Other Decks in Programming