SlideShare uma empresa Scribd logo
DECODING LEGACY
A JOURNEY THROUGH COMMIT MESSAGES
AIRTON ZANON
This talk is not about
Atomic Commits
This talk won’t teach you
advanced GIT tricks
Today we gonna talk about
Commit Messages
and their consequences on the
history of your software
Airton Zanon
Tech Lead at Temper
Having trouble to understand why a
change was done for 9 years
airton.dev
@airtonzanon@phpc.social
git status
git add
git commit
git pull
git push
git log
git checkout
git switch
What I thought version control was for…
But actually …
Why do we use version control?
Reference: https://about.gitlab.com/topics/version-control/#why-use-version-control
Why do I need to add a
description? Isn’t this clear
enough?
WTF took to months to the next commit?? 🤯
?
Today I see that I didn’t leave a good legacy for that
company
Joining a new Company
- Commit Review Culture
Gerrit
git status
git add
git commit
git pull
git push
git log
git checkout
git switch
git blame
git rebase
git merge
Culture
- Commit messages should answer:
- What was changed?
- What problem this commit solves?
- Why are we changing this piece of code?
- Complete the sentence “If applied, this
commit will …”
- Should be reviewed just as
another piece of code
{ WHAT }
{ WHY }
git status
git add
git commit
git pull
git push
git log
git checkout
git switch
git blame
git rebase
git merge
git add -p
git commit --fixup
git amend
git rebase -i
git push --force-with-lease
git bisect
Your software tells a
Story
- What is the legacy of your work? A story that you and others can understand?
or …
- No one thinks it will be important until it
happens to be
- No one thinks it will be important until it
happens to be
- We always say that we will write
documentations, but …
But we can actively keep track of the
changes
Learning the context brings empathy
Empathy
But it’s too much!
Start Simple
- There's no strict definition of the ideal
commit message
- Indicate a logical change, a new feature,
fixing a specific bug
- If you can’t describe the change, split in
smaller ones
Conventional Commits
<type>[optional scope]: <description>
[optional body]
[optional footer(s)]
https://www.conventionalcommits.org/en/v1.0.0/
The commitizen command line utility
https://github.com/commitizen/cz-cli
Resistance!
Self Documented Code Fallacy
Legacy Code
The
Broken Window
Theory
Any fool can write code that a computer can
understand. Good programmers write code
that humans can understand.
- Martin Fowler
Any fool can use a version control. Good
programmers try to help people in the future
to understand the current context.
- Me?!
Next time, take 2 or 3 minutes with your
commit message,
you might thank yourself in the future
Thank you!
Questions!?
airton.dev
@airtonzanon@phpc.social
https://joind.in/talk/f5023

Mais conteúdo relacionado

Semelhante a DECODING LEGACY: A JOURNEY THROUGH COMMIT MESSAGES

3 Git
3 Git3 Git

Semelhante a DECODING LEGACY: A JOURNEY THROUGH COMMIT MESSAGES (20)

git-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdfgit-commands-cheat-sheet-infopediya-com.pdf
git-commands-cheat-sheet-infopediya-com.pdf
 
Git hub party-20151008
Git hub party-20151008Git hub party-20151008
Git hub party-20151008
 
From SVN to Git
From SVN to GitFrom SVN to Git
From SVN to Git
 
Gitting better
Gitting betterGitting better
Gitting better
 
Web-development-git
Web-development-gitWeb-development-git
Web-development-git
 
Getting Git
Getting GitGetting Git
Getting Git
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)
 
What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...What every C++ programmer should know about modern compilers (w/ comments, AC...
What every C++ programmer should know about modern compilers (w/ comments, AC...
 
From DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed ApidaysFrom DevOps to NoOps how not to get Equifaxed Apidays
From DevOps to NoOps how not to get Equifaxed Apidays
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenches
 
3 Git
3 Git3 Git
3 Git
 
Introduction to git & github
Introduction to git & githubIntroduction to git & github
Introduction to git & github
 
From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018From Duke of DevOps to Queen of Chaos - Api days 2018
From Duke of DevOps to Queen of Chaos - Api days 2018
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011
 
Git for Data Analyst - Speaker Presentation.pdf
Git for Data Analyst  - Speaker Presentation.pdfGit for Data Analyst  - Speaker Presentation.pdf
Git for Data Analyst - Speaker Presentation.pdf
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-Developers
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-Developers
 

Mais de Airton Zanon

Mais de Airton Zanon (6)

A jornada de um programador daltonico
A jornada de um programador daltonicoA jornada de um programador daltonico
A jornada de um programador daltonico
 
Espírito de Comunidade
Espírito de ComunidadeEspírito de Comunidade
Espírito de Comunidade
 
Utilizando Git nos seus projetos de software
Utilizando Git nos seus projetos de softwareUtilizando Git nos seus projetos de software
Utilizando Git nos seus projetos de software
 
Espírito de comunidade - Como a comunidade pode melhorar a sua carreira
Espírito de comunidade - Como a comunidade pode melhorar a sua carreiraEspírito de comunidade - Como a comunidade pode melhorar a sua carreira
Espírito de comunidade - Como a comunidade pode melhorar a sua carreira
 
Frameworks front end para design responsivo
Frameworks front end para design responsivoFrameworks front end para design responsivo
Frameworks front end para design responsivo
 
Aula de SQL - Básico
Aula de SQL - BásicoAula de SQL - Básico
Aula de SQL - Básico
 

Último

Último (20)

10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová10 Differences between Sales Cloud and CPQ, Blanka Doktorová
10 Differences between Sales Cloud and CPQ, Blanka Doktorová
 
Connecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAKConnecting the Dots in Product Design at KAYAK
Connecting the Dots in Product Design at KAYAK
 
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
Measures in SQL (a talk at SF Distributed Systems meetup, 2024-05-22)
 
AI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří KarpíšekAI revolution and Salesforce, Jiří Karpíšek
AI revolution and Salesforce, Jiří Karpíšek
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
Integrating Telephony Systems with Salesforce: Insights and Considerations, B...
 
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdfLinux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
Linux Foundation Edge _ Overview of FDO Software Components _ Randy at Intel.pdf
 
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
Choosing the Right FDO Deployment Model for Your Application _ Geoffrey at In...
 
Optimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through ObservabilityOptimizing NoSQL Performance Through Observability
Optimizing NoSQL Performance Through Observability
 
What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024What's New in Teams Calling, Meetings and Devices April 2024
What's New in Teams Calling, Meetings and Devices April 2024
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
PLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. StartupsPLAI - Acceleration Program for Generative A.I. Startups
PLAI - Acceleration Program for Generative A.I. Startups
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024IoT Analytics Company Presentation May 2024
IoT Analytics Company Presentation May 2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptxUnpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
Unpacking Value Delivery - Agile Oxford Meetup - May 2024.pptx
 
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone KomSalesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
Salesforce Adoption – Metrics, Methods, and Motivation, Antone Kom
 
Speed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in MinutesSpeed Wins: From Kafka to APIs in Minutes
Speed Wins: From Kafka to APIs in Minutes
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 

DECODING LEGACY: A JOURNEY THROUGH COMMIT MESSAGES