Re:High-Level Problems with Git and How to Fix Them
by gmueckl on Tuesday December 12, 2017 @01:28AM
(#15903414)
90% of VCS commits are simple enough to not need staging in my experience. That you can stage your changes does not mean that you need to be forced to do that. This is the point the article tries to make: streamline the workflow, but do not remove the feature for power users (people like you).
[ Parent
| on HN ]
Re:High-Level Problems with Git and How to Fix Them
by OJFord on Tuesday December 12, 2017 @02:04AM
(#15903564)
I believe there's a flag to `commit` that effectively does `add .` first.
I disagree with your statistic though - I can't tell you what the flag is precisely because it's almost never what I want; so I never use it and haven't learnt it.
I think these things just vary with workflow.
Re:High-Level Problems with Git and How to Fix Them
by mrich on Tuesday December 12, 2017 @02:24AM
(#15903653)
Just for completeness sake, the command to do that would be
git commit -a
It does an implicit git add -u (which does not add new files not yet part of the repo)
Re:High-Level Problems with Git and How to Fix Them
by qznc on Tuesday December 12, 2017 @04:18AM
(#15904106)
I record my uses of each command and the current counts are the following (g is my shell alias for git):
161 g cap # commit --patch --amend
170 g adu # add -u
205 g add -p # add --patch
277 g ci # commit -a
484 g cip # commit --patch
At least, I use it a lot. ;)
Re:High-Level Problems with Git and How to Fix Them
by gmueckl on Tuesday December 12, 2017 @03:11AM
(#15903831)
So you disagree based on your personal experience? That is fine. I base my observation on what the people around me were using in various environments, so I am actually fairly confident that this can be generalized. This is the best I can do unless someone makes some representative statistics over a broad user base.