H
H
hbrmdc2015-09-05 11:43:38
git
hbrmdc, 2015-09-05 11:43:38

What is the correct way to use git commit comments?

Why do you write comments on commits? So that later you can understand to which commit changes should be rolled back or for reporting to the authorities or for something else?
Some time ago I got acquainted and started to apply a well-defined approach to naming in my development, for example in css classes:

.ComponentName { }
.ComponentName--modifier { }
.ComponentName-elementName { }
.ComponentName-elementName--modifier { }

Realizing how beautiful and convenient it is, both in the short and long term, I wondered if it was worth doing the same with such an important thing as comments on commits.
Do you use a similar approach or another well-defined way of writing commit comments?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
TyzhSysAdmin, 2015-09-05
@POS_troi

Commits should reflect the changes made at a particular moment, the format and completeness are determined by yourself or guided by company policy.
Ideally, when some kind of project management system is used, then the ticket ID is indicated in the commit and you can always see a detailed history of changes - what, where, when, why and why.

I
Igor Deyashkin, 2015-09-07
@Lobotomist

There is a post on Habré on this topic.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question