For instance, I have a file with poor indentation (at least incoherant with the rest of the project).If I correct the indentation and commit, there will be a serious change in the file at a certain point in time, causing the diffs between versions before and after that serious change to be hard to read.How do you handle that king of minor logical modification causing major diffs ?
How do you handle minor change in source code causing discontinuity in version tree?
version control;code quality
I will handle it in this way:Make one commit ONLY involving the indentation correctionDefine a label to categorize this kind of minor logical modification causing major diffs behaviors (e.g. [CodingStandard]), and include such label in the comment on that commit (e.g. [CodingStandard] Correct the indentation)Item 2 is for your convenience when you want to quickly browse the log of the commits. Item 1 makes it easier to verify whether the commit does exactly what the comment suggests.Now, let's say you have 5 commits for this file:            [CodingStandard]                 |                 V X1 <--- X2 <--- X3 <--- X4 <--- X5It doesn't help you if you intend to diff X1 and X5. However, it gives you a chance to isolate diff(X2,X3) out that you just need to study diff(X1,X2) and diff(X3,X5).