Upgrade to Pro — share decks privately, control downloads, hide ads and more …

My Message on Commit Messages

Max Mulatz
January 04, 2019

My Message on Commit Messages

Building and maintaining software is a collaborative effort and version control systems play a core role in supporting people in this. With this talk I want to raise awareness for the importance of commit messages, invite people to embrace them as communication tools and give some ideas on how to approach them and develop the respective mindset for writing useful commit messages.

The talk was given at RUG::B 01/2018

Max Mulatz

January 04, 2019
Tweet

More Decks by Max Mulatz

Other Decks in Programming

Transcript

  1. COMMIT MESSAGES
    MY MESSAGE ON

    View Slide

  2. max
    @klappradla

    View Slide

  3. - DISCLAIMER -
    OPINIONS

    View Slide

  4. GIT

    View Slide

  5. Git is a fast, scalable, distributed revision control system with
    an unusually rich command set that provides both high-level
    operations and full access to internals.
    - git man page -

    View Slide

  6. WHY GIT?

    View Slide

  7. COLLABORATION
    AND
    COMMUNICATION

    View Slide

  8. A “commit” is a snapshot of your files.
    - jake boxer • github -

    View Slide

  9. Stores the current contents of the index in
    a new commit along with a log message
    from the user describing the changes.
    - git man page | git commit -

    View Slide

  10. COMMIT MESSAGE

    View Slide

  11. CASE:
    INFORMATION MISSING

    View Slide

  12. CASE:

    INFORMATION HUNT

    View Slide

  13. A MINDSET FOR
    COMMIT MESSAGES

    View Slide

  14. COMMUNICATION IS KEY

    View Slide

  15. CONTEXT FOR
    YOU•OTHERS•FUTURE YOU

    View Slide

  16. DIFF -> WHAT
    MESSAGE -> WHY

    View Slide

  17. e8d3db2 fix

    View Slide

  18. READ VS. WRITE
    COMMUNITY VS. AUTHOR

    View Slide

  19. MAKE OTHERS’
    LIVES EASIER

    View Slide

  20. CONTENT OF A
    COMMIT MESSAGE

    View Slide

  21. WHY IS THE CHANGE
    NECESSARY?

    View Slide

  22. HOW DOES THIS
    ADDRES THE ISSUE?

    View Slide

  23. WHAT ARE THE
    SIDE EFFECTS
    OF THIS CHANGE?

    View Slide

  24. COMMIT MESSAGES
    AS A
    COMMUNICATION TOOL

    View Slide

  25. THANX!
    YOU-IN-TWO-WEEKS
    FUTURE DEVELOPERS

    View Slide

  26. GUIDELINES FOR
    COMMIT MESSAGE

    View Slide

  27. SUBJECT
    BODY

    View Slide

  28. The subject/body distinction may
    seem unimportant but it’s one of
    many subtle factors that makes Git
    history so much more pleasant to
    work with than Subversion.
    - tpope -

    View Slide

  29. The subject line is used all over Git,
    oftentimes in truncated form if too long
    of a message was used
    - tpope -

    View Slide

  30. SUBJECT

    View Slide

  31. “IF APPLIED, THIS COMMIT
    WILL ”

    View Slide

  32. git commit -m …

    View Slide

  33. View Slide

  34. commit.style
    BODY

    View Slide

  35. .gitmessage

    View Slide

  36. View Slide

  37. TICKET AS SUBJECT:
    LOOK-ELSEWHERE-PROBLEM

    View Slide

  38. MERGE STRATEGIES

    View Slide

  39. THINK ABOUT
    COMMIT MESSAGES
    git commit -m …

    View Slide