问题标签 [git-difftool]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
401 浏览

git - git difftool 持有外壳

我使用 git bash for Windows 和 Beyond & Compare 作为我的 difftool(但任何外部 difftool 都会发生同样的事情)。

我希望我的终端不要等待 difftool 退出以便将终端控制权交还给终端。在命令行中执行其他 git 任务时保持打开 difftool 会话对我很有用。

可能吗 ?

我不知道这是否与此有关,trustexistcode但此设置不会改变我正在寻找的终端行为。

0 投票
2 回答
365 浏览

git - 如何防止`git difftool`调用另一个`vimdiff`?

我已git配置(如下所示)使用vimdiffasdifftool并比较另一对文件,而无需在调用:qa. 这很棒。唯一的问题是有时许多文件存在差异。如何防止git运行另一个vimdiff实例并继续差异队列?

我尝试vim使用非零错误代码 ( :cq) 退出,但没有帮助。

vim如果答案对和都有效,那就太棒了nvim

0 投票
1 回答
749 浏览

git - Sublime Text 3 + Git package: won't launch difftool (Meld)

I'm using Sublime Text 3 plus the Git package to manage my repo. I have the .gitconfig file set up to use the Meld tool (Meld v3.14.2):

which I can launch from a command prompt with $ git difftool with no issues.

I used to be able to do the same with the git package, via the Git Diff Tool Current File and Git Diff Tool All commands. After re-installing Sublime Text 3, when I attempt to do either of those two actions, the window at the bottom of Sublime appears, asking:

I can't input any text here, and furthermore I didn't need to before. If I try Git Diff Current file it opens a new tab with:

(roughly translated from Spanish) So it looks like the arguments to Meld aren't being passed properly. This is my default config file, I have no User configs:

0 投票
2 回答
857 浏览

git - Gui for git 选择要比较的修订版?

我想比较单个文件的不同版本。在命令行上,我可以通过

git difftool <revision_1>:<file_1> <revision_2>:<file_2>.

但我想使用 gui 来选择比较哪些修订。因此,gui 应该显示指定文件更改的提交列表,并且从该列表中应该可以选择两个提交,然后将它们传递给实际的 difftool。

gitk -p file

做类似的事情,但它只会在后续提交之间产生差异。(并且输出只是传统的差异,而不是并排的差异工具)。

0 投票
2 回答
178 浏览

git - 如何仅过滤以 git 上下文格式修改的行

我使用以下命令来确定在 2 次提交之间修改的行数。b26e.. 和 e1f5... 是提交哈希

下面是文件的输出

从此我只需要过滤掉从第一次提交中修改过的行,简单来说我只需要从上面的输出中过滤这部分

我怎样才能过滤掉它,提前谢谢

0 投票
1 回答
28 浏览

git - 如何识别 git difftool 输出中究竟发生了什么

我曾经通过使用来git difftool获得 2 次提交之间的差异context

这里是两个提交哈希$1$2它们作为命令行参数传递给包含上述代码的 shell 脚本。在这里提到的上下文格式中,我们可以很容易地识别出被修改(带!标记)、添加(带+标记)和删除(带-标记)的行。我从上面得到的部分输出如下(从最新到最旧),

最新提交

旧提交

有人可以帮我弄清楚!标记在这里的实际含义。

0 投票
1 回答
923 浏览

git - Git Difftool Meld Doesn't Work in Babun

I'm currently setting up the Meld difftool to work in Babun using the following commands:

This works, and Meld opens with the two files when I run

However, the second file (from the remote) doesn't open, and I get

However, when I run the difftool from git bash it works. Is there something wrong in my setup?

0 投票
1 回答
3755 浏览

git - 如何将 SourceGear DiffMerge 配置为 github windows 的 mergetool 和 difftool?

我知道我们应该使用命令“git mergetool”来解决冲突并使用“git difftool”来比较更改。但是我们如何在 github windows 中将 SourceGear DiffMerge 设置为 github mergetool 和 difftool 呢?

0 投票
2 回答
11884 浏览

git - git - 将 KDiff3 设置为默认合并工具

在安装KDiff3用于管理冲突后git,默认的仍然为我打开:

在此处输入图像描述

这是此答案中提到的配置:

注意:我可以KDiff3使用简单文件单独运行,但不能在我的 git 项目中运行它。任何想法?

编辑:这是我的 .gitconfig :

0 投票
0 回答
596 浏览

git - 使用 git difftool 将当前分支与其他分支提交进行比较

我正在使用的当前 git 分支是 X。

我想使用已安装的 difftool(在我的情况下为 kdiff3)来区分 X 与特定于分支 Y 的提交。

例如git difftool branch_X..branch_Y$commit_hash --tool=kdiff3

实现此目的的正确语法是什么?

谢谢