Best practice git commit #programming #coding #git

preview_player
Показать описание

🔗
Рекомендации по теме
Комментарии
Автор

You can also do git commit -m "head" -m "body"

rocstar
Автор

"4171250 fix shit" felt this deep in my bones

georgeflores
Автор

I like "fix stuff", "fix more stuff", "'commit stuff"

I my PRs become one commit after completing them

LFHiden
Автор

Conventional commits are even more clear. I.e. “feat: add home button” or “fix(homepage): proper button redirect”

tywenkelly
Автор

I think you are missing starting with the issue number because platforms like JIRA need the issue number to associate the commit with stories.

jesprotech
Автор

I usually describe the commit itself: “Adds support for x” ”Fixes bug X” “Removes X”

euden_yt
Автор

Not that it's super important, but the style is to capitalize the first letter in the message

Zack_Taylor
Автор

This is actually a fire tip. I never even thought of doing this somehow

bobDotJS
Автор

Commits should always explain what was changed or fixed. I've looked back at commit changes on a confusing line of code so many times and thanked my past self

wrux
Автор

Genuine question. Why always start with present tense of verb? e.g.,

feat(something): implement something

v.s.

feat(something): implemented something

I always find the latter easy to understand since the commit message means someone 'implemented something' in this commit.

hanscesa
Автор

My coworkers gave me a script that is fairly useful. The commits will look like

fix(“scope”): header
Body

TheRealMjbk
Автор

Waste of time. No one will ever read the details

hudskn
Автор

Did not know about git log --oneline. Imperative grammar seems less beneficial at first glance.

waltershowalter
Автор

You can also achieve this with git commit, and it will bring up your selected editor

crazystve
Автор

I think referring commit message using passive voice in past tense makes more sense to me

Rapid-eraser
Автор

Helpful. Although, I started using better-commits.

I'll take the tip to my grave! 😂

ashuzon
Автор

If you feel it's so long you need AI to create filler, just don't do it. A one liner is fine because the actual code change matters more than your thoughts on it.

Life is becoming like anime, where most of it is AI filler.

vmaxxk
Автор

woah. this is so helpful for my future self! ✨

grae
Автор

Use convential commits, they way better

zeaLZack
Автор

I'll stick with "fix" tyvm.

herrquh