SlideShare une entreprise Scribd logo
1  sur  55
Télécharger pour lire hors ligne
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

Contenu connexe

Similaire à DECODING LEGACY: A JOURNEY THROUGH COMMIT MESSAGES

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.pdfmurad khan
 
CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)CI from scratch with Jenkins (EN)
CI from scratch with Jenkins (EN)Borislav Traykov
 
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...Sławomir Zborowski
 
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 ApidaysOri Pekelman
 
Git from the trenches
Git from the trenchesGit from the trenches
Git from the trenchesNuno Caneco
 
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 2018Christophe Rochefolle
 
Continuous integration
Continuous integrationContinuous integration
Continuous integrationBoris Dominic
 
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 DevelopersMartin Jinoch
 
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)Revelation Technologies
 
Gerrit linuxtag2011
Gerrit linuxtag2011Gerrit linuxtag2011
Gerrit linuxtag2011thkoch
 
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.pdfRicardoCalleja
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-DevelopersAll Things Open
 
Introduction to Git for Non-Developers
Introduction to Git for Non-DevelopersIntroduction to Git for Non-Developers
Introduction to Git for Non-DevelopersJohn Anderson
 

Similaire à 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
 

Plus de Airton Zanon

A jornada de um programador daltonico
A jornada de um programador daltonicoA jornada de um programador daltonico
A jornada de um programador daltonicoAirton Zanon
 
Espírito de Comunidade
Espírito de ComunidadeEspírito de Comunidade
Espírito de ComunidadeAirton Zanon
 
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 softwareAirton Zanon
 
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 carreiraAirton Zanon
 
Frameworks front end para design responsivo
Frameworks front end para design responsivoFrameworks front end para design responsivo
Frameworks front end para design responsivoAirton Zanon
 
Aula de SQL - Básico
Aula de SQL - BásicoAula de SQL - Básico
Aula de SQL - BásicoAirton Zanon
 

Plus 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
 

Dernier

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsPrecisely
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 

Dernier (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Unlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power SystemsUnlocking the Potential of the Cloud for IBM Power Systems
Unlocking the Potential of the Cloud for IBM Power Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 

DECODING LEGACY: A JOURNEY THROUGH COMMIT MESSAGES