Skip to main content

Command Palette

Search for a command to run...

What I Learnt In Git Commits

Published
1 min read

Hey!
Today I learnt about git commits. I was writing code and using git, but I was not satisfied with the commit messages that I was writing so I thought to research on git commit messages.

I Learnt:

  • Write commit messages in imperative mode.

    Like - "Add toggle brightness mode". Imperative mode looks more like a command.

  • Ask yourself these questions:
    a. Why have I made these changes?
    b. What effect have my changes made?
    c. Why was change needed?
    d. What are changes in reference to?

I know this is very short! but i have eliminated the useless paragraphs like - "Why we should make better commits", of course we know why we should make better commits - We are already fed up from bad commits.

Jokes apart - This article was pending from 2 days and saved in draft, So i thought to finish it and publish it. So I finished this in short, But I will be consistent now own wards.

Thankyou