My Message on Commit Messages

F85cfa2c6c69d94bc48ece99b7b2cb59?s=47 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

F85cfa2c6c69d94bc48ece99b7b2cb59?s=128

Max Mulatz

January 04, 2019
Tweet

Transcript

  1. COMMIT MESSAGES MY MESSAGE ON

  2. max @klappradla

  3. - DISCLAIMER - OPINIONS

  4. GIT

  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 -
  6. WHY GIT?

  7. COLLABORATION AND COMMUNICATION

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

    boxer • github -
  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 -
  10. COMMIT MESSAGE

  11. CASE: INFORMATION MISSING

  12. CASE:
 INFORMATION HUNT

  13. A MINDSET FOR COMMIT MESSAGES

  14. COMMUNICATION IS KEY

  15. CONTEXT FOR YOU•OTHERS•FUTURE YOU

  16. DIFF -> WHAT MESSAGE -> WHY

  17. e8d3db2 fix

  18. READ VS. WRITE COMMUNITY VS. AUTHOR

  19. MAKE OTHERS’ LIVES EASIER

  20. CONTENT OF A COMMIT MESSAGE

  21. WHY IS THE CHANGE NECESSARY?

  22. HOW DOES THIS ADDRES THE ISSUE?

  23. WHAT ARE THE SIDE EFFECTS OF THIS CHANGE?

  24. COMMIT MESSAGES AS A COMMUNICATION TOOL

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

  26. GUIDELINES FOR COMMIT MESSAGE

  27. SUBJECT BODY

  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 -
  29. The subject line is used all over Git, oftentimes in

    truncated form if too long of a message was used - tpope -
  30. SUBJECT

  31. “IF APPLIED, THIS COMMIT WILL <SUBJECT>”

  32. git commit -m …

  33. None
  34. commit.style BODY

  35. .gitmessage

  36. None
  37. TICKET AS SUBJECT: LOOK-ELSEWHERE-PROBLEM

  38. MERGE STRATEGIES

  39. THINK ABOUT COMMIT MESSAGES git commit -m …