
This wording (to me, atleast) implies that VS might not respect these types of entries in the. # Note: This is only used by command line # This is need for earlier builds of msysgit that does not have it on by # Set default behavior for command prompt diff. gitattributes file through Visual Studio (Team Explorer > Settings > Repository Settings) it will generate a default, commented attribute file. Is there a reason that Visual Studio doesn't respect my diff-instructions in. It works successfully when I run git diff in the command-line - just not through the VS GUI. I have tried doing this at a repository-level and at a global-level with no success - Visual Studio just doesn't seem to pickup my diff-tool when I try to compare. My use case is similar to, however, I want to do it in Visual Studio (with git-scm). I want to use a custom diff-tool in Visual Studio (2019) for specific file types, for example, I want to use the default visual studio diff tool for every other file type except for. I've also posted this question to StackOverflow for reference: If Visual Studio is your tool of choice I simply suggest you to configure it globally (file is named %userprofile%.gitconfig ) so you can invoke Merge tool from everywhere and have Visual Studio to handle everything.Disclaimer: New to this forum, please retag if in the incorrect area of the site. The net result is similar to what I suggested on my old post, VS just adds the six sections for diff and merge in config file.įigure 4: Git diff and merge section as saved from Visual Studio 2019 preview If you got further conflicts, you do not need to wait for VS to reopen with git mergetool command.īut if you really want to configure VS as Diff and Merge tool, if you press “Use Visual Studio” button ( Figure 3 ) you can modify your local gitconfig.

As an example, if you are doing a rebase from commandline and you got conflicts, it is better to manually open VS, solve the conflict, then continue rebase operation inside VS. But to be honest, latest VS git integration is really good and it is surely better to manually open local repository. If you configured instead VS as diff and tool you can simply issue a git mergetool command and everything is done automatically without any user intervention.
DIFFMERGE GIT CONFIG FULL
The rationale behind this choice is: If you are inside a tool (like VS) that has full support for diff and merge, the tool will automatically present you with diff and merge capabilities without checking repo configuration. If you are inside Visual Studio it will handle diff and merge automatically, even if it is not configured as Diff or Merge Tool. If you use only Visual Studio this settings is not so useful, if you have a conflict during merge or rebase visual studio will automatically show conflicts and guide you during merging. Merge and Diff configurations are typical settings that are made at User level and not for each single repository.įigure 3: Diff and Merge tool configuration inside Visual Studio.Īs you can see, in Figure 3 no diff or merge tool was set for the current repository, this means that it will use the default one for the user (in my situation is none). If you open Repository Settings usually you find that no specific diff and merge tool is set.

Settings pane contains a specific section for Git, where you can configure settings for the current repository or Global settings, valid for all repository of current user.įigure 2: Git settings inside Visual Studio If you use Visual Studio 2017 or greater, you can simply go to to Team Explorer and open settings of the repository.įigure 1: Git repository settings inside Visual Studio Team Explorer That post was written when Visual Studio 2012 was the latest version and the integration with Git was still really young, made with an external plugin made by Microsoft and with really basic support.

DIFFMERGE GIT CONFIG HOW TO
After almost six years, the post on How to configure diff and merge tool in Visual Studio Git Tools is still read by people that found it useful, but it is now really really old and needs to be updated.
