What kind of files are these, I got them using the gitmerge tool to resolve conflicts?

How gitmergetool works. I have conflicts when doing git merge, and now I want to get rid of these merge conflicts, and I was looking at SO to get some information on how to do this, and there was one suggestion to use git mergetool, I never used the git merge tool, but when I use the git merge tool than to get some local, remote and backup files for my own files, and I have something like

  #*merge*#30260IgX# #*merge*#48883jX# 

What this file does (so to speak) means and how I can get rid of it, because I’m not sure what it is ... I don’t want to pass this on to my repositories, any suggestions or work, and I would also appreciate if anyone Someone can point me to the correct resource for using the git merge tool .

Thank!!!

+3
git
May 17 '10 at 17:23
source share
1 answer

First step, install KDiff3 .
This is not the most beautiful graphical interface in the world, but as soon as you get used to it, it is quite applicable and has the additional advantage of working with natural Git, without having to configure a lot.

In the second step, open .gitconfig (in your home directory, C:\Users\(username) or down the old Documents and Settings path) and add the following:

 [diff] tool = kdiff3 [merge] tool = kdiff3 [mergetool "kdiff3"] path = C:/Program Files/KDiff3/kdiff3.exe keepBackup = false trustExitCode = false 

Now all calls to git difftool and git mergetool should be the default for KDiff3.
That is all you need to be good! Much easier than worrying about all these packages.




You will find a good tutorial here (in great gitguru ):

git mergetool

The git mergetool command allows you to integrate these tools into the merge process. The start after merge conflicts has been identified, it goes through the files that need to be resolved, and provides the specified tool with the version information needed to trigger a three-way merge.

git mergetool already includes support for a number of open source and freely available merge tools: kdiff3, tkdiff, meld, xxdiff, emerge, vimdiff, gvimdiff, ecmerge and opendiff.

Support for additional tools, including DiffMerge and Araxis Merge, can be added through user configuration settings if there is a command line call:

 git config --global mergetool.[tool].cmd [command-line call] git config --global mergetool.[tool].trustExitCode [true|false] 

The --global flag is --global , so this option will be applied in all of your Git repositories.

The command line should accept the following file variables passed as parameters:

  • $LOCAL - The current version of the branch
  • $REMOTE - Version for merging
  • $BASE - Common Ancestor
  • $MERGED - The file in which the results will be written

git mergetool will create versions as temporary files and set the variables accordingly before executing the tool command line.

If the tool returns the correct exit code after a successful or unsuccessful merge, then trustExitCode can be set to true. Otherwise, set it to false, so you will be asked to resolve merge conflicts for the file.

Conflict Merge

The sequence of commands for merging using mergetool will be

 git merge git mergetool -t [tool] git add . git commit 

You can specify the default tool using the merge.tool parameter

 git config --global merge.tool [tool] 

This will allow you to simply call

 git mergetool 

alt text http://gitguru.com/wp-content/uploads/2009/02/opendiff.png

+2
May 17 '10 at 17:54
source share



All Articles