19 karma · joined Apr 9, 2009 (17y ago) · 8 submissions
comment 16y ago · link · parent
It depends. I make complex merges/branches on a regular basis and I find myself using `commit -a` pretty often, but I am also diligently branching out whenever I start working on something different, so I'm often confident that all the files that are both tracked and modified are the ones I want to commit.
blasedl:
I think that `git add -p` (committing certain changes in a file but not others) is a pretty advanced feature. I can see how it can be a life saver for experienced users, but I recommend creating two branches with each 100% of your changes rather than using just one branch that contains 60% and 40% of your changes.
One switch that I find very useful is `git add -i`, which you should use whenever you want to add 2 files but you have 20 untracked ones in your working directory.
comment 17y ago · link · parent
comment 17y ago · link · parent
I see this at the opposite.
Just because an object says that it responds to a method doesn't guarantee that invoking said method will succeed. I'm not sure why the original poster is so surprised by this finding.
Since this observation is valid in both statically and dynamically typed languages, I prefer a statically typed one since at least, I don't need to verify that the object does respond to that method before calling it.