re: Git and Github - must know commands to make your first commit VIEW POST


Helpful article for beginners, but. And it is a big but:

Anyone who uses -am to commit all the things is, of course, in a state of sin.

No, seriously. There is no amount of "I am in a hurry" or "lets take shortcuts" or "I know what I'm doing" justifies omitting the review your changes and adding them one by one instead if necessary. The amount of bugs I catch in the work of otherwise talented young engineers just because they used -am as a "fire and forget" method to commit things is staggering. And it just leads to bad practices in general.

Honestly, I wish more people would use git add --patch instead, and split up their commits to smaller ones, instead of just listing all the changes in a three line commit message, and forgetting half of it (because they won't notice what -am just did for them).


Really helpful feedback, thanks, I really appreciate that.

I will carefully revise about the points you mentioned and update the article real soon!


Wow, git add --patch is excellent.
I usually just review the staged diffs in VSCode, but I'm sure it'll come in handy.

code of conduct - report abuse