In all the tutorials I see of using SVN or Git, they always show them updating individual files. I may work on 100 files in 1 day, is it normal to work on many files and at the end of the day, just do 1 commit for all the files instead of doing each file individually that I modify?
Share
You generally want to group commits into logically related changes, all with one commit message.
You should always commit working code; don’t commit something that’s half done and breaks the build, which could also break someone who’s trying to find out which commit introduced a bug by testing older versions. Each commit should contain a small set of changes that are all related to each other.
I wouldn’t recommend batching up all of your changes for the day into one commit. If you need to look through the history later on, it will be hard to find the change you need if an entire day’s work is crammed together into one commit. If you need to revert a change, it’s best if you can revert an entire commit, instead of having to selectively revert a file at a time.
Of course, on some days, you will have a complicated change that takes an entire day to create; in that case, if it’s all one logical change, then do one commit at the end of the day. Be reasonable, there are no absolute rules here.