Are you the 'lazy' type and often write them poorly and unorganized, with no proper explanation of the action and later have trouble navigating in ...
For further actions, you may consider blocking this person and/or reporting abuse
I follow the Conventional Commit standard, because it allows me to automate Semantic Versioning in CI pipelines.
Examples:
Added a new CLI command?
$ git commit -m "feat: add foo command" && git push
then CI tests, builds, and increments MINOR version1.0.9
->1.1.0
, and publishes artifacts.Fixed a race condition bug?
$ git commit -m "fix: fix race condition" && git push
then CI tests, builds, and increments PATCH version1.1.0
->1.1.1
, and publishes artifacts.If a feature or bug fix is non-backward compatible, then add
BREAKING CHANGE
in git commit message, which will lead to incrementing the MAJOR version1.1.1
->2.0
.If any change needs some context (eg why the change was made), I add it in the commit message body. More often, I reference the ticket or issue in bug tracker, like:
This looks interesting. I should look this up soon. Maybe I can reach out to you, if I need some help.
I like this, I'm curious, do you use something automated to handle your semantic versioning like this?
I use semantic-release for all my projects. I like it because it is language-agnostic.
semantic-release
CLI in CI.I'm using git alias for writing beautiful commit messages. Below, I pasted a few lines from the
.gitconfig
file.Here is an example of an improvement commit.
This is awesome 👍
Thanks for sharing 🙏❤
There are conventions; without going semantic versioning all the way:
In a team environment:
Own work: will stop and ask myself what's going on when I err on the "improved a thing" side of things for any length of time as this could signal I'm losing focus or trying to muddle through/conflating separate issues.
When working in a team, I always use ticket number and description of a change, where change is always localized, not pushing 50 file changes in a single commit.
This allows me to go back to the ticket when looking at the code to see what were the exact requirements
Don't you just love seeing "WIP" and then 10+ file changed?
On a personal project, I always use some meaningful message, it just helps when looking at git blame and timeframes
Here are my examples!
Did you know a commit can be quite long actually? I usually have a short title like 'Ticket Number: short description' and then follow with details in a short paragraph.
It may be overkill but commits aren't for you. It's for the poor maintainer trying to add a new feature a year from now. It helps for them to know what the hell you were thinking when you made the change.
this
We are using strict git conventions at our project.
It includes branch naming like [feature|bugfix]/XXX-YYY-3-words-description, where XXX is a short name of project in Jira and YYY is a number of ticket.
For git commits we are using rules:
1) Name like XXX-YYY Do something
2) Name should be up to 80 symbols, detailed description if needed comes as new lines
3) Name should have imperative voice like "Do...", "Make...", "Fix..." instead of "Did","Making", "Fixes"
PR's should have the same naming conventions as git commits.
Talking about being organized 💯👍
I think I will remember and bam, 10 commits later--no idea. I have been getting better with specifics, but sometimes I fall back into bad habits. Nice article Madza!
git commit -m update
Seriously lazy sometimes.
Quite a bit. But it is less about the message and more about the commit itself. I have too much to say on the subject.
Git is a Communication tool
Jesse Phillips ・ Dec 12 '18 ・ 2 min read
Thank you for sharing 🙏❤
Good post! Seems pretty useful indeed. But I'd rather try to write better short messages and that is a hard skill to master I think...
Thanks and glad you liked it 🙏❤
Interesting post thx for sharing 😀! I guess I'll start adding emoticons then ✨.
Keep calm and Commit lint
The answer is "probably not enough"
Thank you for sharing this. It's looks fun and interesting to include Gitmoji's as a single shot summary. I should start following this in my future commits.
I recommend commitizen with cz-emoji.
Not much to be honest, maybe its because I work on a duo (sometimes) or completely alone, but the problem comes when the typo appears 🤣🤣
Interesting!