This article was first published on Medium. You can take a look at it here.
Have you ever wondered how one learns to use Git well? You use Git ver...
For further actions, you may consider blocking this person and/or reporting abuse
git add -A
is an anti-pattern, please don't recommend it as a rule of thumb!Use
git status
to list files andgit add
for each file you want/need to add. Then learn aboutgit add -i
(orgit add -p
), or use GUIs for a point-and-click UX (I personally usegit citool
most of the time, andgit add -p
when I need to edit a hunk, but this is quite rare).The rule of thumb really is not to forget that this is about "version control" (like any VCS), and not some backup tool. Commits, commit logs and commit history need to be crafted with care and love, for your coworkers/contributors, and your future self.
Learn about the existence of
git blame
andgit bisect
(assuming you already know and usegit log
and/orgitk
or similar tool) to understand why a clean history is good for you.Those are my advice.