My company just wants to switch from Microsoft VSS to Git with KDiff3, and we ran into a problem.
As known, Git tracks contents instead of files. That is a great feature, and we love that. But it happens that two different parts of the same file has to be editied by two programmer at the same time. Git tries to do a diff and a merge and if it can insert both editing into the final, it does that. But there are many times when these two editings are exclusive to each other.
Example: Original version:
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
</Grid>
Edit #1:
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<Button Content="Click here" Grid.Row="1" />
</Grid>
Edit #2:
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<CheckBox Content="Check it!" Grid.Row="1" />
</Grid>
As you can see, these two editions are not creating a merge conflict, but - if you are somewhat familiar with WPF, XAML - the Grid.Row attributes will "kill" each other, resulting an awkward visual.
So this "conflict" is not in the text, but in the logic. Of course, this is a simple example, and with strict coding style it can be solved. But we are changing the version control system, so we have lots of codes like this, so we are simply not capable to rewrite the whole project by a new coding style.
Is it possible to tell Git or KDiff3 to just check if the files themselves are different, and that means conflict instead of the content?
Thanks, SanTa