A couple new developers in our office (myself included) reformatted some files in Visual Studio, which changed whitespace and caused conflicts when merging in smartgit. I'm seeing that git has the option -Xignore-space-change to navigate changes in whitespace. Is there a way in smartgit to use this option when merging?
Smartgit doesn't support this feature, but because smartgit is a GUI for a command line backend, you can open a shell window from within Smartgit and type any command the backend supports.
To open Git-Shell, select Tools > Git-Shell.
I was working on a feature branch off our "develop" branch, so my command line to merge develop into my branch while ignoring whitespace looked like this:
$ git.exe merge --no-ff --no-commit -Xignore-all-space develop
I'm new to git, so for a tip on the commandline commands, I ran merge through the Smartgit interface and saw the shell commands echo'd to the Output window:
$ git.exe merge --no-ff --no-commit develop
(To see the output commands, make sure Edit > Preferences > Commands > "Show executed command in output window" is active). I then just copied-and-pasted the command text into the Git-Shell and inserted the -Xignore-all-space option. The results of the merge, including any remaining conflicts to resolve, nicely populate the Smartgit GUI, just as if the command had run through the GUI.
EDIT: Saw suggestion somewhere to add the --no-commit option, so added it above