mergetool

Is Git's auto-detection scripted or is it within some Git executable?

我与影子孤独终老i 提交于 2019-11-28 14:24:09
This question is based on VonC's comment at the thread . Is Git's auto-detection for difftool or mergetool scripted or is it within some Git executable? It's scripted in git-mergetool. I found this at line 344 of my copy. if test -z "$merge_tool"; then merge_tool=`git config merge.tool` if test -n "$merge_tool" && ! valid_tool "$merge_tool"; then echo >&2 "git config option merge.tool set to unknown tool: $merge_tool" echo >&2 "Resetting to default..." unset merge_tool fi fi if test -z "$merge_tool" ; then if test -n "$DISPLAY"; then merge_tool_candidates="kdiff3 tkdiff xxdiff meld gvimdiff"

How to use Visual Studio Code as Default Editor for Git MergeTool

时光总嘲笑我的痴心妄想 提交于 2019-11-28 13:12:03
问题 Today I was trying to use the git mergetool on Windows Command Prompt and realized that it was defaulting to use VIM , which is cool, but I'd prefer VSCode . How can I have Visual Studio Code function as my GUI for handling merge conflicts (or even as a diffing tool) for Git? 回答1: As of VSCode 1.13 Better Merge was integrated into the core of VSCode. The way to wire them together is to modify your .gitconfig and you have two options . To do this with command line entries, enter each of these:

How to use opendiff as default mergetool

孤人 提交于 2019-11-28 09:04:06
Hi I am trying to use opendiff as the git mergetool, but when I run mergetool I get this error message: The merge tool opendiff is not available as 'opendiff' What am I doing wrong? It was working fine before, but since I installed a new harddrive it's not working anymore :( Kevin Leary You'll need to configure opendiff as your global merge.tool: # locate xcode utilities sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # set "opendiff" as the default mergetool globally git config --global merge.tool opendiff If you get Agreeing to the Xcode/iOS license requires admin

Why can't I use TortoiseMerge as my git merge tool on Windows?

一个人想着一个人 提交于 2019-11-28 04:19:23
I'm trying to perform my first Git merge ever (exciting!), but can't get Git Gui (0.13.GITGUI from Git 1.7.4.msysgit.0) to recognize TortoiseMerge (1.6.11.20210 x64) on Windows 7. Based on an answer to a similar question , I've made the following configuration changes: $ git config --global merge.tool tortoisemerge $ git config --global mergetool.tortoisemerge.cmd 'TortoiseMerge.exe -base:"$BASE" -mine:"$LOCAL" -theirs:"$REMOTE" -merged:"$MERGED"' $ git config --global --list ...snip... merge.tool=tortoisemerge mergetool.tortoisemerge.cmd=TortoiseMerge.exe -base:"$BASE" -mine:"$LOCAL" -theirs:

What should I do when git revert aborts with an error message?

♀尐吖头ヾ 提交于 2019-11-27 22:39:45
OK, so I'm getting an error sometimes when I try to revert a commit (with Git). All that I do is git revert <commit hash> and it gives me this message: error: could not revert <commit hash> <commit message> hint: after resolving the conflicts, mark the corrected paths hint: with 'git add <paths>' or 'git rm <paths>' Does this mean that I should use git mergetool and resolve any conflicts? Once I do this can I add/rm and then commit, and the revert is complete? Yes you will have to resolve the conflicts, mark them as so with git add or git rm and git commit The commit is not done yet, after the

git tells me that I Merge conflict, but also tells me that no files need merging

落爺英雄遲暮 提交于 2019-11-27 22:17:34
问题 I committed some changes in the branch new . I checkout out to master . When I tried to merge: $ git merge new Auto-merging js/site.js CONFLICT (content): Merge conflict in js/site.js Automatic merge failed; fix conflicts and then commit the result. So I installed kdiff3 and configured my config files and when I tried to use mergetools I got: $ git mergetool kdiff3 No files need merging I ran a diff and it outputted this: diff --cc js/site.js index 8c17d62,7955b13..0000000 --- a/js/site.js ++

Is there a way to make Git mark a file as conflicted?

孤街浪徒 提交于 2019-11-27 21:48:24
It's possible to commit files that contains conflict data. Is there a way to mark these files as conflicted again, so that running git mergetool will generate the necessary files and run the merge tool? You can get contents of file with conflict markers using git checkout --conflict=merge -- file , but if you have cleaned up index by using git add file (or if GUI did that for you) it wouldn't work. There is git update-index --unresolve , but it is hacky, and does not work very reliably. I think the state it restores would be not enough for git-mergetool. You would probably have to redo merge,

How could I force mergetool GUI (KDiff3) to be always shown?

岁酱吖の 提交于 2019-11-27 20:24:45
问题 How could I force the mergetool GUI to be always shown and disable any automatic resolving? Sometimes when there is a conflict during a merge and I use the mergetool, it simply immediately returns after I hit Enter on question "Hit return to start merge resolution tool (kdiff3)" and no GUI is shown and the conflict appears to be resolved. I have Git configured to use KDiff3 as the mergetool now, but it happened also when I have codecompare as the mergetool specified. I know that there is an

Git: How configure KDiff3 as merge tool and diff tool

那年仲夏 提交于 2019-11-27 16:37:11
Recently I was using GitExtension 2.46, but the Git version that has the same is 1.9.4.msysgit.2. Willing to use only Git commands, I uninstalled GitExtension and install the latest version available of Git and KDiff3 . When I make a merge and have conflicts, I run the following command: $ git mergetool Then I receive the message: The merge tool kdiff3 is not available as 'kdiff3'. I guess it must be by the KDiff3 path. Environment OS: Windows 10 Git 2.6.1.windows.1 KDiff3 0.9.98 (64 bit) Questions: What do I have to configure in the .gitconfig file for the command $ git mergetool to open the

How can I make WinMerge my git mergetool?

雨燕双飞 提交于 2019-11-27 10:47:41
I'm trying to integrate WinMerge with Git as I've seen others done before on Windows 7 Ultimate. I've followed the following steps, but an error continues to show up when I do a git mergetool which defaults to vimdiff. Created a file called winmerge.sh in the root directory of git: C/Program Files (x86)/Git/ with: WinMergeU is the correct location. #!/bin/sh echo Launching WinMergeU.exe: $1 $2 "C:/Program Files (x86)/WinMerge/WinMergeU.exe" git /e /u /dl "Base" /dr "Mine" "$1" "$2" and used the following commands. git config --global diff.tool winmerge git config --global difftool.winmerge.cmd