Re:Empirical Evidence for the Value of Version Control?
by scott_w on Monday December 17, 2012 @05:56AM
(#4931799)
Keeping commits small is crucial. I've been bitten by the "big commit" enough times to force myself to keep commit diffs to a few lines across a few files.
I even go as far as to put "formatting" changes into one commit, and actual code into a separate commit. Formatting changes tend to be things like "unindent this large block of code", or "strip extraneous whitespace".
They can be larger than usual commits, but they allow me to separate functional changes from non-functional changes. And yes, I've seen a non-functional change break working code before.
Re:Empirical Evidence for the Value of Version Control?
by steferson on Monday December 17, 2012 @08:27AM
(#4932156)
>And yes, I've seen a non-functional change break working code before.
Really? how? I'm really curious about this.
Re:Empirical Evidence for the Value of Version Control?
by scott_w on Friday December 21, 2012 @05:35AM
(#4952206)
Honestly, I don't know how it happened.
The changeset was unindenting an HTML file with in-line JavaScript by 4 spaces.
The JavaScript stopped working, so I reverted the change and it worked again.
Additionally, you said "As luck would have it, it was a big one," - this is what I personally use `git add -p` and `git rebase -i` for before pushing to the public repo: I try to keep the commits as small and self-contained as possible such that finding the faulty commit gets much simpler, because there will be no "big one".