Using Vim to EASILY Format Git Commit Messages

preview_player
Показать описание
One of my good habits is keeping the git commit history clean and informative.

Besides prefixing the branch name with the ticket number, I also like to put the ticket number in the individual commit messages as well.

Because of this, my git history also serves as documentation, as we can pinpoint exactly why a certain code change happened.

Having the ticket number in the commit message means that we can reference the ticket that caused this code commit to happen, and this can happen with a click of a button in your CVS web interface, in GitLab for example.

GitLab can be integrated with your Task Management software - such as Jira or Trello.

Now that you see why having the ticket number in the commit messages is useful, you might also think that it's tedious to write the ticket number in the commit message every time you create a commit.

This is where Vim comes to rescue again.

---

---

Photo by @sigmund on Unsplash
Рекомендации по теме