Announcement

Collapse
No announcement yet.

Using different merge tools with different data files

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using different merge tools with different data files

    Hello everybody,

    we want to use different merge tools for different data files.

    For example:

    We created the mergetools tool1 and tool2. Both are selected by the programm path. We can swap manually between this both tools (tool1 or tool2).

    But we want that every file will be opened with tool1 and special files (*.xproj) will be opened with the tool2. But only this special file type. All other data files should use the tool1.



    Is there any possible solution using the .gitattribut? What can we do?



    Thanks a lot!

  • #2
    Much easier to configure: just create an "intercept" script that decides which tool to run based on suffix. It can then exec() the appropriate tool.
    This is pretty easy in Bash/Linux. No idea about Windows.

    OR

    Look for the following in the output of "git config --help" (and others surrounding those):

    merge.<driver>.name
    merge.<driver>.driver
    merge.<driver>.name
    mergetool.<tool>.path
    mergetool.<tool>.cmd

    Then search for "Defining a custom merge driver" in the output of "man gitattributes".

    Please do this with a recent version of Git (e.g. 2.20.0 or newer...).
    Last edited by DougR; 11-19-2019, 10:14 PM.

    Comment

    Working...
    X