SlideShare a Scribd company logo
Telling stories through your
commits
BY JOEL CHIPPINDALE AT LRUG IN JANUARY 2015
CC BY-SA 4.0
Not about Ruby
Not even about git
Managing complexity
by Cory Doctorow (CC BY-SA)
Your commit history is…
Kept forever
Always up to date
Searchable
$ git log --grep='Commit contents'
$ git log -S 'Diff contents'
$ git blame
Telling stories through your commits (Jan 2015)
“Every line of code is always
documented”
- Mislav Marohnić
from http://mislav.uniqpath.com/2014/02/hidden-documentation/
5 Principles
by Umberto Rotundo (CC BY)
1. Make atomic commits
by lupusphotos (CC BY)
$ git log --shortstat
commit: [REDACTED]
Author: [REDACTED]
Date: [REDACTED]
bug fixes and wp 4.0.1 update
1377 files changed,
175405 insertions(+),
248 deletions(-)
What if this commit had
been split up?
21dfe89 Fix category page redirects
e275479 Fix deletion of author avatars
d824e02 Fix H2 headers on mobile
f8e36d4 Fix footer floating bug
d972537 Fix blog author avatar upload
d26e788 Remove unused author pages
7b91091 Fix blog feed
2f05036 Fix mixed content warnings
ed21e18 WordPress 4.0.1 update
Minimum viable commit
Avoid ‘and’ in commit messages
Make atomic commits
so that you can
make sense of your commits
2. Write good commit messages
by Ginny (CC BY-SA)
What does good look like?
Short one line title
Longer description of what the change
does (if the title isn’t enough).
An explanation of why the change is
being made.
Perhaps a discussion of context and/or
alternatives that were considered.
Short one line title
Longer description of what the change
does (if the title isn’t enough).
An explanation of why the change is
being made.
Perhaps a discussion of context and/or
alternatives that were considered.
Short one line title
Longer description of what the change
does (if the title isn’t enough).
An explanation of why the change is
being made.
Perhaps a discussion of context and/or
alternatives that were considered.
Short one line title
Longer description of what the change
does (if the title isn’t enough).
An explanation of why the change is
being made.
Perhaps a discussion of context and/or
alternatives that were considered.
Short one line title
Longer description of what the change
does (if the title isn’t enough).
An explanation of why the change is
being made.
Perhaps a discussion of context and/or
alternatives that were considered.
Correct the colour of FAQ link in course notice footer
PT: https://www.pivotaltracker.com/story/show/84753832
In some email clients the colour of the FAQ link in the
course notice footer was being displayed as blue instead of
white. The examples given in PT are all different versions
of Outlook. Outlook won't implement CSS changes that
include `!important` inline[1]. Therefore, since we were
using it to define the colour of that link, Outlook wasn't
applying that style and thus simply set its default style
(blue, like in most browsers). Removing that `!important`
should fix the problem.
[1] https://www.campaignmonitor.com/blog/post/3143/
outlook-2007-and-the-inline-important-declaration/
Write good commit messages
(including why and the context)
so that you can
make sense of your commits
3. Revise history before sharing
by hoodedfang (CC BY-NC)
$ git rebase --interactive
Remove, reorder, edit,
merge and split commits
324d079 Fix typo in "Add Foo"
ab2189d Remove Bar
2a11e7d Add Foo
$ git rebase —interactive master
Telling stories through your commits (Jan 2015)
Telling stories through your commits (Jan 2015)
1bd241c Remove Bar
773e345 Add Foo
Rewrite history before sharing
so that your collaborators can
make sense of your commits
4. Use single purpose branches
by Jon Bennet (CC BY)
When you take a diversion
move the work off the branch
Use single purpose branches
so that you can
make sense of your current work
5. Keep your history linear
Telling stories through your commits (Jan 2015)
Rebase before you merge
Telling stories through your commits (Jan 2015)
$ git merge --no-ff
Keep your history linear
so that you can
make sense of it
1. Make atomic commits
2. Write good commit messages
3. Revise history before sharing
4. Use single purpose branches
5. Keep your history linear
by beglen (CC BY)
Questions?
@joelchippindale
joel.chippindale@futurelearn.com
futurelearn.com/blog
CC BY-SA 4.0

More Related Content

PDF
Telling stories through your commits - Lead Developer Conference 2016
Joel Chippindale
 
PPTX
EAD Version 3: Possible Outcomes
Michael Rush
 
PPT
2310 b xd
Krazy Koder
 
PDF
Keynote presentation OOFHEC2016: Mark lester
EADTU
 
PDF
Reducing risk through continuous delivery (Nov 2014)
FutureLearn
 
PPT
Teaching in MOOCs: Unbundling the roles of the educator
Rebecca Ferguson
 
PPT
Rethinking education
Rebecca Ferguson
 
PPTX
Simon Nelson: FutureLearn
Yishay Mor
 
Telling stories through your commits - Lead Developer Conference 2016
Joel Chippindale
 
EAD Version 3: Possible Outcomes
Michael Rush
 
2310 b xd
Krazy Koder
 
Keynote presentation OOFHEC2016: Mark lester
EADTU
 
Reducing risk through continuous delivery (Nov 2014)
FutureLearn
 
Teaching in MOOCs: Unbundling the roles of the educator
Rebecca Ferguson
 
Rethinking education
Rebecca Ferguson
 
Simon Nelson: FutureLearn
Yishay Mor
 

Viewers also liked (11)

PDF
A Social Learning Grid for MOOCs: Exploring a FutureLearn Case
davinia.hl
 
PDF
Future Learn
BettShow
 
PPTX
R ferguson lak15
Rebecca Ferguson
 
PDF
Reflections on teaching and information behaviour in a Futurelearn MOOC
Sheila Webber
 
PDF
MOOCS and The Future of Elearning, By Future Learn
Lets learn Digital
 
PPTX
The ethics of MOOC research: why we should involve learners
Rebecca Ferguson
 
PPTX
Moocs: what the research tells us
Rebecca Ferguson
 
PPTX
Learning analytics, learning design and MOOCs
Rebecca Ferguson
 
PDF
UCD15 Talk - Lucy Blackwell - How Experiences Sell Products
UCD UK Ltd
 
PPTX
Social learning at massive scale LWMOOCs 2015 slideshare
Mike Sharples
 
PPTX
Small Group Discussion for a MOOC Platform
Mike Sharples
 
A Social Learning Grid for MOOCs: Exploring a FutureLearn Case
davinia.hl
 
Future Learn
BettShow
 
R ferguson lak15
Rebecca Ferguson
 
Reflections on teaching and information behaviour in a Futurelearn MOOC
Sheila Webber
 
MOOCS and The Future of Elearning, By Future Learn
Lets learn Digital
 
The ethics of MOOC research: why we should involve learners
Rebecca Ferguson
 
Moocs: what the research tells us
Rebecca Ferguson
 
Learning analytics, learning design and MOOCs
Rebecca Ferguson
 
UCD15 Talk - Lucy Blackwell - How Experiences Sell Products
UCD UK Ltd
 
Social learning at massive scale LWMOOCs 2015 slideshare
Mike Sharples
 
Small Group Discussion for a MOOC Platform
Mike Sharples
 
Ad

Similar to Telling stories through your commits (Jan 2015) (20)

PDF
Simplify writing code with deliberate commits
Joel Chippindale
 
PDF
Simplify writing code with deliberate commits - London Python Meetup
Joel Chippindale
 
PDF
On committing well
James Aylett
 
PDF
Writing Commits for You, Your Friends, and Your Future Self
All Things Open
 
PDF
Git best practices 2016
Otto Kekäläinen
 
PDF
Commit to good commit messages
Henrique Moody
 
PDF
Git best practices workshop
Otto Kekäläinen
 
PDF
AP slides - Spring 1403 - Workshop Team
arasvalizadeh
 
PPTX
Git style best practices - OLX
Thamara Hessel
 
PPTX
Introduction To Git Workshop
themystic_ca
 
PDF
Git Makes Me Angry Inside
Emma Jane Hogbin Westby
 
PPTX
Crafting Better Commits
Brant Burnett
 
PPTX
Crafting Better Git Commits
Brant Burnett
 
PDF
Git_Practices - Guidelines.pdf
harshit259398
 
PDF
Git why how when and more
Gastón Acosta
 
PPTX
Source control management
Owen Winkler
 
PPT
git.ppt
ssuser10dcd71
 
PPT
Learn Git Basics
Prakash Dantuluri
 
ODP
Git for standalone use
Ikuru Kanuma
 
ODP
Introduction to Git
Amit Mathur
 
Simplify writing code with deliberate commits
Joel Chippindale
 
Simplify writing code with deliberate commits - London Python Meetup
Joel Chippindale
 
On committing well
James Aylett
 
Writing Commits for You, Your Friends, and Your Future Self
All Things Open
 
Git best practices 2016
Otto Kekäläinen
 
Commit to good commit messages
Henrique Moody
 
Git best practices workshop
Otto Kekäläinen
 
AP slides - Spring 1403 - Workshop Team
arasvalizadeh
 
Git style best practices - OLX
Thamara Hessel
 
Introduction To Git Workshop
themystic_ca
 
Git Makes Me Angry Inside
Emma Jane Hogbin Westby
 
Crafting Better Commits
Brant Burnett
 
Crafting Better Git Commits
Brant Burnett
 
Git_Practices - Guidelines.pdf
harshit259398
 
Git why how when and more
Gastón Acosta
 
Source control management
Owen Winkler
 
git.ppt
ssuser10dcd71
 
Learn Git Basics
Prakash Dantuluri
 
Git for standalone use
Ikuru Kanuma
 
Introduction to Git
Amit Mathur
 
Ad

Recently uploaded (20)

PPTX
How tech helps people in the modern era.
upadhyayaryan154
 
PPTX
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
PPTX
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
PPTX
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
PPTX
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
PPT
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
PPTX
Crypto Recovery California Services.pptx
lionsgate network
 
PPTX
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
PDF
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
PPTX
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
PPTX
Unlocking Hope : How Crypto Recovery Services Can Reclaim Your Lost Funds
lionsgate network
 
PPTX
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
PPTX
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
PPTX
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
PPTX
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
PDF
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
PDF
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
PDF
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
PPTX
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
PPTX
AI ad its imp i military life read it ag
ShwetaBharti31
 
How tech helps people in the modern era.
upadhyayaryan154
 
原版北不列颠哥伦比亚大学毕业证文凭UNBC成绩单2025年新版在线制作学位证书
e7nw4o4
 
B2B_Ecommerce_Internship_Simranpreet.pptx
LipakshiJindal
 
Slides Powerpoint: Eco Economic Epochs.pptx
Steven McGee
 
The Monk and the Sadhurr and the story of how
BeshoyGirgis2
 
1965 INDO PAK WAR which Pak will never forget.ppt
sanjaychief112
 
Crypto Recovery California Services.pptx
lionsgate network
 
The Latest Scam Shocking the USA in 2025.pptx
onlinescamreport4
 
Slides: PDF Eco Economic Epochs for World Game (s) pdf
Steven McGee
 
办理方法西班牙假毕业证蒙德拉贡大学成绩单MULetter文凭样本
xxxihn4u
 
Unlocking Hope : How Crypto Recovery Services Can Reclaim Your Lost Funds
lionsgate network
 
Google SGE SEO: 5 Critical Changes That Could Wreck Your Rankings in 2025
Reversed Out Creative
 
Artificial-Intelligence-in-Daily-Life (2).pptx
nidhigoswami335
 
dns domain name system history work.pptx
MUHAMMADKAVISHSHABAN
 
谢尔丹学院毕业证购买|Sheridan文凭不见了怎么办谢尔丹学院成绩单
mookxk3
 
Data Protection & Resilience in Focus.pdf
AmyPoblete3
 
The Internet of Things (IoT) refers to a vast network of interconnected devic...
chethana8182
 
LB# 820-1889_051-7370_C000.schematic.pdf
matheusalbuquerqueco3
 
Black Yellow Modern Minimalist Elegant Presentation.pptx
nothisispatrickduhh
 
AI ad its imp i military life read it ag
ShwetaBharti31
 

Telling stories through your commits (Jan 2015)

  • 1. Telling stories through your commits BY JOEL CHIPPINDALE AT LRUG IN JANUARY 2015 CC BY-SA 4.0
  • 4. Managing complexity by Cory Doctorow (CC BY-SA)
  • 9. $ git log --grep='Commit contents'
  • 10. $ git log -S 'Diff contents'
  • 13. “Every line of code is always documented” - Mislav Marohnić from http://mislav.uniqpath.com/2014/02/hidden-documentation/
  • 14. 5 Principles by Umberto Rotundo (CC BY)
  • 15. 1. Make atomic commits by lupusphotos (CC BY)
  • 16. $ git log --shortstat commit: [REDACTED] Author: [REDACTED] Date: [REDACTED] bug fixes and wp 4.0.1 update 1377 files changed, 175405 insertions(+), 248 deletions(-)
  • 17. What if this commit had been split up?
  • 18. 21dfe89 Fix category page redirects e275479 Fix deletion of author avatars d824e02 Fix H2 headers on mobile f8e36d4 Fix footer floating bug d972537 Fix blog author avatar upload d26e788 Remove unused author pages 7b91091 Fix blog feed 2f05036 Fix mixed content warnings ed21e18 WordPress 4.0.1 update
  • 20. Avoid ‘and’ in commit messages
  • 21. Make atomic commits so that you can make sense of your commits
  • 22. 2. Write good commit messages by Ginny (CC BY-SA)
  • 23. What does good look like?
  • 24. Short one line title Longer description of what the change does (if the title isn’t enough). An explanation of why the change is being made. Perhaps a discussion of context and/or alternatives that were considered.
  • 25. Short one line title Longer description of what the change does (if the title isn’t enough). An explanation of why the change is being made. Perhaps a discussion of context and/or alternatives that were considered.
  • 26. Short one line title Longer description of what the change does (if the title isn’t enough). An explanation of why the change is being made. Perhaps a discussion of context and/or alternatives that were considered.
  • 27. Short one line title Longer description of what the change does (if the title isn’t enough). An explanation of why the change is being made. Perhaps a discussion of context and/or alternatives that were considered.
  • 28. Short one line title Longer description of what the change does (if the title isn’t enough). An explanation of why the change is being made. Perhaps a discussion of context and/or alternatives that were considered.
  • 29. Correct the colour of FAQ link in course notice footer PT: https://www.pivotaltracker.com/story/show/84753832 In some email clients the colour of the FAQ link in the course notice footer was being displayed as blue instead of white. The examples given in PT are all different versions of Outlook. Outlook won't implement CSS changes that include `!important` inline[1]. Therefore, since we were using it to define the colour of that link, Outlook wasn't applying that style and thus simply set its default style (blue, like in most browsers). Removing that `!important` should fix the problem. [1] https://www.campaignmonitor.com/blog/post/3143/ outlook-2007-and-the-inline-important-declaration/
  • 30. Write good commit messages (including why and the context) so that you can make sense of your commits
  • 31. 3. Revise history before sharing by hoodedfang (CC BY-NC)
  • 32. $ git rebase --interactive
  • 33. Remove, reorder, edit, merge and split commits
  • 34. 324d079 Fix typo in "Add Foo" ab2189d Remove Bar 2a11e7d Add Foo
  • 35. $ git rebase —interactive master
  • 39. Rewrite history before sharing so that your collaborators can make sense of your commits
  • 40. 4. Use single purpose branches by Jon Bennet (CC BY)
  • 41. When you take a diversion move the work off the branch
  • 42. Use single purpose branches so that you can make sense of your current work
  • 43. 5. Keep your history linear
  • 47. $ git merge --no-ff
  • 48. Keep your history linear so that you can make sense of it
  • 49. 1. Make atomic commits 2. Write good commit messages 3. Revise history before sharing 4. Use single purpose branches 5. Keep your history linear