SlideShare a Scribd company logo
1 of 28
How to write proper
git commit messages
Hanokh.Aloni@gmail.com
Git commit -m”...?”
@hanokhaloni
Hanokhaloni
hanokhaloni
git log --oneline
a6455f8 bugfix
b529f6d revert the bugfix
b5bb6e4 revert "revert the bugfix"
c829cbc more fix
5feaccf wip
5ba3db6 wip
84564a0 add files
e142fd1 do stuff
git log --oneline
a6455f8 aaaaaaaaaaaaaaaaaa
b529f6d YOLO
b5bb6e4 fix tpyo
c829cbc more fix
5feaccf Whatever
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Committing in accordance with the prophecy.
Why do we need a good commit
message?
Git let’s you time travel
So you need to know where you want to travel to
In terms of who did what , and when?
What makes a good commit
message?
Git history should be human-readable, in the
past-tense, and explain what was changed.
a6455f8 aaaaaaaaaaaaaaaaaa
b529f6d YOLO
b5bb6e4 fix tpyo
c829cbc more fix
5feaccf Updated readme.md
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Updated gitlab.yaml
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 aaaaaaaaaaaaaaaaaa
b529f6d YOLO
b5bb6e4 fix tpyo
c829cbc more fix
5feaccf Whatever
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Committing in accordance with the prophecy.
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel
b529f6d YOLO
b5bb6e4 fix tpyo
c829cbc more fix
5feaccf Whatever
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Committing in accordance with the prophecy.
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel
b529f6d Introduced the decision engine
b5bb6e4 fix tpyo
c829cbc more fix
5feaccf Whatever
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Committing in accordance with the prophecy.
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel
b529f6d Introduced the decision engine
b5bb6e4 Allowed course description page
c829cbc more fix
5feaccf Whatever
5ba3db6 Removed unused fields
84564a0 docs
e142fd1 Committing in accordance with the prophecy.
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel
b529f6d Introduced the decision engine
b5bb6e4 Allowed course description page
C829cbc Fixed a bug
5feaccf Updated lodash
5ba3db6 Removed unused fields
84564a0 Updated docbook and user guide
e142fd1 Add tests
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel
b529f6d Introduced the decision engine
b5bb6e4 Allowed course description page
C829cbc Fixed a bug
5feaccf Updated lodash
5ba3db6 Removed unused fields
84564a0 Updated docbook and user guide
e142fd1 Add tests
Git history should be human-readable, in
the past-tense, and explain what was
changed.
a6455f8 Added side panel to front page.
b529f6d Introduced the decision engine.
b5bb6e4 Allowed invited users to see the course description page.
c829cbc Fix : Send enrolment invitation emails in batches of 1000.
5feaccf Updated lodash to v4.17.21
5ba3db6 Removed unused fields on the User model
84564a0 Updated docbook and user guide
e142fd1 Add tests for ImportSelector metadata
Some keywords you should be able to use
Add
Create
Refactor
Fix
Release
Feature
Performance
Modify
Update
Remove
Delete
Docs
Test
Style
Some keywords you should be able to use
Add
Create
Refactor
Fix
Release
Feature
Performance
Modify
Update
Remove
Delete
Docs
Test
Style
Git history should be human-readable, in the
past-tense, and explain what was changed.
a6455f8 feat: Added side panel to front page.
b529f6d feat: Introduced the decision engine.
b5bb6e4 feat: Allowed invited users to see the course description page.
c829cbc fix: Send enrolment invitation emails in batches of 1000.
5feaccf refactor: Updated lodash to v4.17.21
5ba3db6 refactor: Removed unused fields on the User model
84564a0 docs: Updated docbook and user guide
e142fd1 test: Add tests for ImportSelector metadata
Bonus - trace back to your JIRA / task
a6455f8 feat: Added side panel to front page (ARDA-711)
b529f6d feat: Introduced the decision engine (ARDA-712)
b5bb6e4 feat: Allowed invited users to see the course description page (ARDA-35)
c829cbc fix: Send enrolment invitation emails in batches of 1000 (ARDA-730)
5feaccf refactor: Updated lodash to v4.17.21 (ARDA-690)
5ba3db6 refactor: Removed unused fields on the User model (ARDA-714)
84564a0 docs: Updated docbook and user guide (ARDA-715)
e142fd1 test: Add tests for ImportSelector metadata (ARDA-716)
Stuck? Just ask yourself the following
questions:
Why have I made these changes?
What effect have my changes made?
Why was the change needed?
What are the changes in reference to?
commit eb0b56b19017ab5c16c745e6da39c53126924ed6
Author: Pieter Wuille <pieter.wuille@gmail.com>
Date: Fri Aug 1 22:57:55 2014 +0200
Simplify serialize.h's exception handling (#145)
Remove the 'state' and 'exceptmask' from serialize.h's stream
implementations, as well as related methods.
As exceptmask always included 'failbit', and setstate was
always
called with bits = failbit, all it did was immediately raise an
exception. Get rid of those variables, and replace the setstate
with direct exception throwing (which also removes some
dead
code).
As a result, good() is never reached after a failure (there are
only 2 calls, one of which is in tests), and can just be replaced
by !eof().
fail(), clear(n) and exceptions() are just never called. Delete
them.
https://github.com/bitcoin/bitcoin/co
mmit/eb0b56b19017ab5c16c745e6
da39c53126924ed6
Some tools that can help - commitizen
Some tools that can help - commitlint
Oh, you can also rewrite history if you need!
Oh, you can also rewrite history if you need!
Git history should be :
- Human-readable.
- In the past-tense.
- Explain what was changed.
Use keywords.
Bonus points for reference (JIRA / issue #).
Use tools like commitzen and commitlint.
Fix it if you need to (rewrite history if needed)
Links
http://whatthecommit.com/
https://git-scm.com/book/en/v2/Git-Basics-Viewing-the-Commit-
History
https://git-scm.com/book/en/v2/Git-Tools-Rewriting-History
https://github.com/commitizen/cz-cli
@hanokhaloni
Hanokhaloni
hanokhaloni

More Related Content

Similar to How to write proper GIT commit messages.pptx

Python-Institute.realtests.PCAP.v20q.pdf
Python-Institute.realtests.PCAP.v20q.pdfPython-Institute.realtests.PCAP.v20q.pdf
Python-Institute.realtests.PCAP.v20q.pdfssuser22b701
 
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017Katie Sylor-Miller
 
Git: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best PracticesGit: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best PracticesJeremy Leisy
 
TC74VHCT04AFN PSpice Model (Free SPICE Model)
TC74VHCT04AFN PSpice Model  (Free SPICE Model)TC74VHCT04AFN PSpice Model  (Free SPICE Model)
TC74VHCT04AFN PSpice Model (Free SPICE Model)Tsuyoshi Horigome
 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUGMatthew McCullough
 
Scheduling by Primavera - Training
Scheduling by Primavera - TrainingScheduling by Primavera - Training
Scheduling by Primavera - TrainingMohammed Feroze
 
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc  2015 HTTP 1, HTTP 2 and folksDevoxx Maroc  2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folksNicolas Martignole
 
5_Analy gf gafg f ad a ffg fa sis_for_LXS2C.docx
5_Analy  gf gafg f ad   a  ffg fa sis_for_LXS2C.docx5_Analy  gf gafg f ad   a  ffg fa sis_for_LXS2C.docx
5_Analy gf gafg f ad a ffg fa sis_for_LXS2C.docxMisael Rodriguez
 
Sprint 138
Sprint 138Sprint 138
Sprint 138ManageIQ
 
CCNA 200-301 IPv6 addressing and subnetting MCQs Collection
CCNA 200-301 IPv6 addressing and subnetting MCQs CollectionCCNA 200-301 IPv6 addressing and subnetting MCQs Collection
CCNA 200-301 IPv6 addressing and subnetting MCQs CollectionCAS
 
Sprint 140
Sprint 140Sprint 140
Sprint 140ManageIQ
 
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docx
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docxLab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docx
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docxsmile790243
 
Sprint 200
Sprint 200Sprint 200
Sprint 200ManageIQ
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsShannon McFarland
 
Flink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaFlink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaDataWorks Summit
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeMd Swawibe Ul Alam
 

Similar to How to write proper GIT commit messages.pptx (20)

Python-Institute.realtests.PCAP.v20q.pdf
Python-Institute.realtests.PCAP.v20q.pdfPython-Institute.realtests.PCAP.v20q.pdf
Python-Institute.realtests.PCAP.v20q.pdf
 
Git-ing out of your git messes - Fluent Conf 2017
Git-ing out of  your git messes - Fluent Conf 2017Git-ing out of  your git messes - Fluent Conf 2017
Git-ing out of your git messes - Fluent Conf 2017
 
Git: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best PracticesGit: Overview, Pitfalls, Best Practices
Git: Overview, Pitfalls, Best Practices
 
TC74VHCT04AFN PSpice Model (Free SPICE Model)
TC74VHCT04AFN PSpice Model  (Free SPICE Model)TC74VHCT04AFN PSpice Model  (Free SPICE Model)
TC74VHCT04AFN PSpice Model (Free SPICE Model)
 
Git Going for the Transylvania JUG
Git Going for the Transylvania JUGGit Going for the Transylvania JUG
Git Going for the Transylvania JUG
 
Scheduling by Primavera - Training
Scheduling by Primavera - TrainingScheduling by Primavera - Training
Scheduling by Primavera - Training
 
Intro to Git and GitHub
Intro to Git and GitHubIntro to Git and GitHub
Intro to Git and GitHub
 
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc  2015 HTTP 1, HTTP 2 and folksDevoxx Maroc  2015 HTTP 1, HTTP 2 and folks
Devoxx Maroc 2015 HTTP 1, HTTP 2 and folks
 
5_Analy gf gafg f ad a ffg fa sis_for_LXS2C.docx
5_Analy  gf gafg f ad   a  ffg fa sis_for_LXS2C.docx5_Analy  gf gafg f ad   a  ffg fa sis_for_LXS2C.docx
5_Analy gf gafg f ad a ffg fa sis_for_LXS2C.docx
 
Sprint 138
Sprint 138Sprint 138
Sprint 138
 
ARM 64bit has come!
ARM 64bit has come!ARM 64bit has come!
ARM 64bit has come!
 
CCNA 200-301 IPv6 addressing and subnetting MCQs Collection
CCNA 200-301 IPv6 addressing and subnetting MCQs CollectionCCNA 200-301 IPv6 addressing and subnetting MCQs Collection
CCNA 200-301 IPv6 addressing and subnetting MCQs Collection
 
Sprint 140
Sprint 140Sprint 140
Sprint 140
 
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docx
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docxLab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docx
Lab 3 Cover SheetNameAdders and Two’s ComplementDateGrade .docx
 
Sprint 200
Sprint 200Sprint 200
Sprint 200
 
Deploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack EnvironmentsDeploying IPv6 in OpenStack Environments
Deploying IPv6 in OpenStack Environments
 
Flink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at AlibabaFlink SQL & TableAPI in Large Scale Production at Alibaba
Flink SQL & TableAPI in Large Scale Production at Alibaba
 
Example 006
Example 006Example 006
Example 006
 
Advanced Git Presentation By Swawibe
Advanced Git Presentation By SwawibeAdvanced Git Presentation By Swawibe
Advanced Git Presentation By Swawibe
 
Git foundation
Git foundationGit foundation
Git foundation
 

More from Hanokh Aloni

NWD Total commander for fun and profit!!!
NWD Total commander for fun and profit!!!NWD Total commander for fun and profit!!!
NWD Total commander for fun and profit!!!Hanokh Aloni
 
CI CD OPS WHATHAVEYOU
CI CD OPS WHATHAVEYOUCI CD OPS WHATHAVEYOU
CI CD OPS WHATHAVEYOUHanokh Aloni
 
Architectural kata 0 of n.pptx
Architectural kata 0 of n.pptxArchitectural kata 0 of n.pptx
Architectural kata 0 of n.pptxHanokh Aloni
 
Code smells (1).pptx
Code smells (1).pptxCode smells (1).pptx
Code smells (1).pptxHanokh Aloni
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes Hanokh Aloni
 
Things senior developers should know
Things senior developers should knowThings senior developers should know
Things senior developers should knowHanokh Aloni
 
Cynefin framework in software engineering
Cynefin framework in software engineeringCynefin framework in software engineering
Cynefin framework in software engineeringHanokh Aloni
 
Trunk based vs git flow
Trunk based vs git flowTrunk based vs git flow
Trunk based vs git flowHanokh Aloni
 
How to write unmaintainable code
How to write unmaintainable codeHow to write unmaintainable code
How to write unmaintainable codeHanokh Aloni
 
How i learned to stop worrying and love the logs
How i learned to stop worrying and love the logsHow i learned to stop worrying and love the logs
How i learned to stop worrying and love the logsHanokh Aloni
 
Game is ggj2018 presentation
Game is ggj2018 presentationGame is ggj2018 presentation
Game is ggj2018 presentationHanokh Aloni
 
Game is ggj2017 presentation
Game is ggj2017 presentationGame is ggj2017 presentation
Game is ggj2017 presentationHanokh Aloni
 
02 terms and issues
02 terms and issues02 terms and issues
02 terms and issuesHanokh Aloni
 

More from Hanokh Aloni (20)

NWD Total commander for fun and profit!!!
NWD Total commander for fun and profit!!!NWD Total commander for fun and profit!!!
NWD Total commander for fun and profit!!!
 
CI CD OPS WHATHAVEYOU
CI CD OPS WHATHAVEYOUCI CD OPS WHATHAVEYOU
CI CD OPS WHATHAVEYOU
 
Architectural kata 0 of n.pptx
Architectural kata 0 of n.pptxArchitectural kata 0 of n.pptx
Architectural kata 0 of n.pptx
 
Code smells (1).pptx
Code smells (1).pptxCode smells (1).pptx
Code smells (1).pptx
 
NWD the73js.pptx
NWD the73js.pptxNWD the73js.pptx
NWD the73js.pptx
 
top developer mistakes
top developer mistakes top developer mistakes
top developer mistakes
 
Things senior developers should know
Things senior developers should knowThings senior developers should know
Things senior developers should know
 
Cynefin framework in software engineering
Cynefin framework in software engineeringCynefin framework in software engineering
Cynefin framework in software engineering
 
Microservices
MicroservicesMicroservices
Microservices
 
Wcbpijwbpij new
Wcbpijwbpij newWcbpijwbpij new
Wcbpijwbpij new
 
Trunk based vs git flow
Trunk based vs git flowTrunk based vs git flow
Trunk based vs git flow
 
How to write unmaintainable code
How to write unmaintainable codeHow to write unmaintainable code
How to write unmaintainable code
 
How i learned to stop worrying and love the logs
How i learned to stop worrying and love the logsHow i learned to stop worrying and love the logs
How i learned to stop worrying and love the logs
 
Game is ggj2018 presentation
Game is ggj2018 presentationGame is ggj2018 presentation
Game is ggj2018 presentation
 
Microservices
MicroservicesMicroservices
Microservices
 
Game is ggj2017 presentation
Game is ggj2017 presentationGame is ggj2017 presentation
Game is ggj2017 presentation
 
02 terms and issues
02 terms and issues02 terms and issues
02 terms and issues
 
Sip introduction
Sip introductionSip introduction
Sip introduction
 
Tdd guide
Tdd guideTdd guide
Tdd guide
 
Git
GitGit
Git
 

Recently uploaded

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...Soham Mondal
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLDeelipZope
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZTE
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxupamatechverse
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxDeepakSakkari2
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAbhinavSharma374939
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...Call Girls in Nagpur High Profile
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 

Recently uploaded (20)

Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Tanvi Call 7001035870 Meet With Nagpur Escorts
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
OSVC_Meta-Data based Simulation Automation to overcome Verification Challenge...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
Current Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCLCurrent Transformer Drawing and GTP for MSETCL
Current Transformer Drawing and GTP for MSETCL
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
ZXCTN 5804 / ZTE PTN / ZTE POTN / ZTE 5804 PTN / ZTE POTN 5804 ( 100/200 GE Z...
 
Introduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptxIntroduction to Multiple Access Protocol.pptx
Introduction to Multiple Access Protocol.pptx
 
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptxBiology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
Analog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog ConverterAnalog to Digital and Digital to Analog Converter
Analog to Digital and Digital to Analog Converter
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
High Profile Call Girls Nashik Megha 7001305949 Independent Escort Service Na...
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 

How to write proper GIT commit messages.pptx

  • 1. How to write proper git commit messages Hanokh.Aloni@gmail.com
  • 4. git log --oneline a6455f8 bugfix b529f6d revert the bugfix b5bb6e4 revert "revert the bugfix" c829cbc more fix 5feaccf wip 5ba3db6 wip 84564a0 add files e142fd1 do stuff
  • 5. git log --oneline a6455f8 aaaaaaaaaaaaaaaaaa b529f6d YOLO b5bb6e4 fix tpyo c829cbc more fix 5feaccf Whatever 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Committing in accordance with the prophecy.
  • 6. Why do we need a good commit message? Git let’s you time travel So you need to know where you want to travel to In terms of who did what , and when?
  • 7. What makes a good commit message?
  • 8. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 aaaaaaaaaaaaaaaaaa b529f6d YOLO b5bb6e4 fix tpyo c829cbc more fix 5feaccf Updated readme.md 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Updated gitlab.yaml
  • 9. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 aaaaaaaaaaaaaaaaaa b529f6d YOLO b5bb6e4 fix tpyo c829cbc more fix 5feaccf Whatever 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Committing in accordance with the prophecy.
  • 10. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel b529f6d YOLO b5bb6e4 fix tpyo c829cbc more fix 5feaccf Whatever 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Committing in accordance with the prophecy.
  • 11. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel b529f6d Introduced the decision engine b5bb6e4 fix tpyo c829cbc more fix 5feaccf Whatever 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Committing in accordance with the prophecy.
  • 12. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel b529f6d Introduced the decision engine b5bb6e4 Allowed course description page c829cbc more fix 5feaccf Whatever 5ba3db6 Removed unused fields 84564a0 docs e142fd1 Committing in accordance with the prophecy.
  • 13. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel b529f6d Introduced the decision engine b5bb6e4 Allowed course description page C829cbc Fixed a bug 5feaccf Updated lodash 5ba3db6 Removed unused fields 84564a0 Updated docbook and user guide e142fd1 Add tests
  • 14. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel b529f6d Introduced the decision engine b5bb6e4 Allowed course description page C829cbc Fixed a bug 5feaccf Updated lodash 5ba3db6 Removed unused fields 84564a0 Updated docbook and user guide e142fd1 Add tests
  • 15. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 Added side panel to front page. b529f6d Introduced the decision engine. b5bb6e4 Allowed invited users to see the course description page. c829cbc Fix : Send enrolment invitation emails in batches of 1000. 5feaccf Updated lodash to v4.17.21 5ba3db6 Removed unused fields on the User model 84564a0 Updated docbook and user guide e142fd1 Add tests for ImportSelector metadata
  • 16. Some keywords you should be able to use Add Create Refactor Fix Release Feature Performance Modify Update Remove Delete Docs Test Style
  • 17. Some keywords you should be able to use Add Create Refactor Fix Release Feature Performance Modify Update Remove Delete Docs Test Style
  • 18. Git history should be human-readable, in the past-tense, and explain what was changed. a6455f8 feat: Added side panel to front page. b529f6d feat: Introduced the decision engine. b5bb6e4 feat: Allowed invited users to see the course description page. c829cbc fix: Send enrolment invitation emails in batches of 1000. 5feaccf refactor: Updated lodash to v4.17.21 5ba3db6 refactor: Removed unused fields on the User model 84564a0 docs: Updated docbook and user guide e142fd1 test: Add tests for ImportSelector metadata
  • 19. Bonus - trace back to your JIRA / task a6455f8 feat: Added side panel to front page (ARDA-711) b529f6d feat: Introduced the decision engine (ARDA-712) b5bb6e4 feat: Allowed invited users to see the course description page (ARDA-35) c829cbc fix: Send enrolment invitation emails in batches of 1000 (ARDA-730) 5feaccf refactor: Updated lodash to v4.17.21 (ARDA-690) 5ba3db6 refactor: Removed unused fields on the User model (ARDA-714) 84564a0 docs: Updated docbook and user guide (ARDA-715) e142fd1 test: Add tests for ImportSelector metadata (ARDA-716)
  • 20. Stuck? Just ask yourself the following questions: Why have I made these changes? What effect have my changes made? Why was the change needed? What are the changes in reference to?
  • 21. commit eb0b56b19017ab5c16c745e6da39c53126924ed6 Author: Pieter Wuille <pieter.wuille@gmail.com> Date: Fri Aug 1 22:57:55 2014 +0200 Simplify serialize.h's exception handling (#145) Remove the 'state' and 'exceptmask' from serialize.h's stream implementations, as well as related methods. As exceptmask always included 'failbit', and setstate was always called with bits = failbit, all it did was immediately raise an exception. Get rid of those variables, and replace the setstate with direct exception throwing (which also removes some dead code). As a result, good() is never reached after a failure (there are only 2 calls, one of which is in tests), and can just be replaced by !eof(). fail(), clear(n) and exceptions() are just never called. Delete them. https://github.com/bitcoin/bitcoin/co mmit/eb0b56b19017ab5c16c745e6 da39c53126924ed6
  • 22. Some tools that can help - commitizen
  • 23. Some tools that can help - commitlint
  • 24. Oh, you can also rewrite history if you need!
  • 25. Oh, you can also rewrite history if you need!
  • 26. Git history should be : - Human-readable. - In the past-tense. - Explain what was changed. Use keywords. Bonus points for reference (JIRA / issue #). Use tools like commitzen and commitlint. Fix it if you need to (rewrite history if needed)

Editor's Notes

  1. Commit messages API https://commitizen-tools.github.io/commitizen/