Use past tense in git commit messages

preview_player
Показать описание
Should you be using past or present tense in your git commit messages?

LEGAL DISCLAIMER
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Everything here is for informational purposes only. All non-licensed clips used for fair use commentary, criticism, and educational purposes. See Hosseinzadeh v. Klein, 276 F.Supp.3d 34 (S.D.N.Y. 2017); Equals Three, LLC v. Jukin Media, Inc., 139 F. Supp. 3d 1094 (C.D. Cal. 2015).
Рекомендации по теме
Комментарии
Автор

Just a quick little video I made for fun :) Next video is on fixing merge conflicts, will be out next week (they take me about 20-30h to create so thanks for your patience). Please consider subscribing if you like this type of content!

philomatics
Автор

just use “Bug fixes and other improvements” every time

kzco-iqcw
Автор

I read somewhere once that a commit message should complete the following sentence. "If you apply this commit it will ..." That made sense to me and I use it as a mental template for writing commits.

RobHortn
Автор

I would say that the reasons to use present tense in commit messages are
- it's the convention (including stuff like autogenerated merge messages)
- it's shorter and you want to fit in 80 characters because for some reason even modern tools can still crop things after 80 characters
- even when it's mostly a work log, I think it makes more sense to use present tense the moment you start doing things like reverting commits, cherry picking between branches, etc. In git, commits effectively represent "changes you can make." Even if you mostly just have a flat history, I think it makes more sense with basically every other functionality of git.

yaksher
Автор

I prefer present tense because it gets rid of unnessary letters in the commit messages (mostly the letter d at the end of verbs), since Fix is shorter than Fixed, Create is shorter than Created, etc. But i do use a combination of keywords (docs, fix, feat, style, test, etc.) and present tense in my commits.

e.
Автор

Nah, my commit messages will always be: "Dunno. I forgot to commit before and now I did too many changes to remeber all of them"

iAmTaki
Автор

0:44 yes... that's what the message is for. It's something relative to the commit, not about what the developer did or the project manager manager wants.

IIARROWS
Автор

present tense makes more sense to me, even when you are using a project alone, or in a centralized core team, because you are telling the team what you are adding when they do a PR review.

laughingvampire
Автор

Not only is present tense shorter, it is also for myself to apply my own commit as a patch, so it makes sense. If I use past tense my subsequent commands later look odd. Git rebase for example and merge will feel like you're wasting time fixing already done things but a merge and rebase can take significant effort and time

mrbutish
Автор

I personally use present tense because 1. It's common enough and 2. it's shorter. Everyone knows that a commit message describes what was done in that commit, so verb tenses are redundant. That said, I don't really care if my team uses past tense either. Something something hobgoblin of little minds.

isodoubIet
Автор

feet shot so unexpected it gave me whiplash, but great video as always!

allydouillette
Автор

My commit says “who, me? Nothing! Just hangin’around!”

galaxian_hitchhiker
Автор

I always read/write commits in this context: “This commit will <commit message>”

computerhoofd
Автор

Commits are like functions that manipulate the source code in order. And you wouldn't name functions in past tense.

But I do like your loaded tactic of "either agree with me or toss a coin"!

alanevans
Автор

Applying a coherent style of conventional commits and present tense is worthwhile if there are more than two developers involved, the team structure is likely to change, there is an influx of new people and so on. From time to time, someone will need to dig through git history and will be grateful. Normally, you will reference the issues in in your pms solution, which then will keep track of, what has been done to achieve what.

BrimfulEmptiness
Автор

I'm bootcamping atm, and we have been instructed that the only acceptable way to write a commit is present tense, with prefixes. The prefixes I really like, and make sense. I really hate the present tense commits though, for some reason I find them much harder to write than past tense.

paultapping
Автор

Let's see Paul Allen's commit messages.

sprytnychomik
Автор

Love these videos on git.I am learning alot

zygote
Автор

In some project I caught myself writing in present progressive. Like when I look at the changes a commit applies, it is happening right now 😅

JockelGaming
Автор

What tense is "[date] [time] last commit before I sleep"

duytdl