Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 792575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:00:51+00:00 2026-05-14T22:00:51+00:00

How does gitmergetool works. I have conflicts while doing git merge and now I

  • 0

How does gitmergetool works. I have conflicts while doing git merge and now I want to get rid of those merge conflicts and I was browsing SO to get some information on how to do it and there was one suggestion of using git mergetool, I have never used git merge tool but when I do use git merge tool than am getting some local, remotes and backups files for my own files and than I have something like

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

What does this file(if I may say so) means and how do I can get rid of it as I am not sure of what it is…I do not want to commit this to my repos, any suggestions or work around and also would appreciate if some one can point me to proper resource for using git merge tool.

Thanks !!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:00:52+00:00Added an answer on May 14, 2026 at 10:00 pm
    • "Merging with “git mergetool”" is a starting point, the general theory behind difftool and mergetool being presented in:
      "How do I view ‘git diff’ output with visual diff program?"

    • that being said, for certain standard diff/merge tool, it is even simpler:
      "An easier way to set up diff and merge tools for Git on Windows"

    First step, install KDiff3.
    It’s not the prettiest GUI in the world, but once you get used to it it is quite usable and has the added advantage of working quite naturally with Git without having to configure much.

    Second step, open your .gitconfig (in your home directory, C:\Users\(username), or down ye olde 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 default to KDiff3.
    That’s all you need to be good to go!
    Much simpler than bothering with all those wrappers.


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

    git mergetool

    The git mergetool command allows for the integration of those tools into the merge process. Run after merge conflicts have been identified, it loops through the files that need to be resolved and provides the specified tool with the version information necessary to invoke the 3-way merge.

    git mergetool already includes support for a number 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 via custom configuration settings provided a command-line call exists:

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

    The “--global” flag is used, so the setting will apply across all of your Git repositories.

    The command line needs to accept the following file variables passed in as parameters:

    • $LOCAL – Current branch version
    • $REMOTE – Version to be merged
    • $BASE – Common ancestor
    • $MERGED – File where results will be written

    git mergetool will create the versions as temporary files and set the variables appropriately before the tool command-line is executed.

    If the tool returns a proper exit code after a successful or unsuccessful merge, then the trustExitCode setting can be set to true.
    Otherwise, set it to false, so you will be prompted whether the merge conflicts for a file were resolved.

    Performing a Merge with Conflicts

    The sequence of commands for a merge using mergetool would be

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

    You can specify a default tool via the merge.tool setting

    git config --global merge.tool [tool]
    

    This will allow you to just simply call

    git mergetool
    

    opendiff

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 499k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This is not pretty but it works: rm -R $(ls… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer Yes. Override the base1 and base2 methods in Derived to… May 16, 2026 at 12:45 pm
  • Editorial Team
    Editorial Team added an answer No, you can't. Unfortunately, UIEvent doesn't expose any public way… May 16, 2026 at 12:45 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.