- r - 以节省内存的方式增长 data.frame
- ruby-on-rails - ruby/ruby on rails 内存泄漏检测
- android - 无法解析导入android.support.v7.app
- UNIX 域套接字与共享内存(映射文件)
默认的 git diff 行为是依次打开每个 diff 文件(在打开下一个文件之前等待上一个文件关闭)。
我正在寻找一种同时打开所有文件的方法 - 例如,在 BeyondCompare 中,这将在同一 BC 窗口的选项卡中打开所有文件。
这将使审查一组复杂的更改变得更加容易;在 diff 文件之间来回切换并忽略不重要的文件。
最佳答案
以 git
开头v1.7.11,可以使用 git difftool --dir-diff
执行目录差异。
例如,此功能适用于 Meld 3.14.2,并允许您浏览所有修改过的文件:
git difftool --dir-diff --tool=meld HEAD~ HEAD
这是一个方便的 Bash 函数:
git-diff-meld() (
git difftool --dir-diff --tool=meld "${1:-HEAD~}" "${2:-HEAD}"
)
以下答案适用于 git
安装早于 v1.7.11。
同样的问题在 git mail list 上被问到.
我根据该电子邮件线程整理了一个 shell 脚本,该脚本在任意提交之间执行目录差异。
从 git v1.7.10 开始,git-diffall
脚本包含在 contrib
中标准的 git 安装。
对于 v1.7.10 之前的版本,您可以从 git-diffall
安装项目 GitHub .
这是项目描述:
The git-diffall script provides a directory based diff mechanism for git. The script relies on the diff.tool configuration option to determine what diff viewer is used.
This script is compatible with all the forms used to specify a range of revisions to diff:
1)
git diffall
: shows diff between working tree and staged changes
2)git diffall --cached [<commit>]
: shows diff between staged changes andHEAD
(or other named commit)
3)git diffall <commit>
: shows diff between working tree and named commit
4)git diffall <commit> <commit>
: show diff between two named commits
5)git diffall <commit>..<commit>
: same as above
6)git diffall <commit>...<commit>
: show the changes on the branch containing and up to the second , starting at a common ancestor of both<commit>
Note: all forms take an optional path limiter
[--] [<path>]
This script is based on an example provided by Thomas Rast on the Git list.
关于git difftool,立即打开所有差异文件,而不是串行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1220309/
这个问题在这里已经有了答案: Why does "git difftool" not open the tool directly? (2 个答案) 关闭 6 年前。 当使用 git difftoo
我有 2 个文件夹(具有不同的代码)并初始化了 git。但是当我这样做的时候 git difftool -t meld 一个存储库运行良好,并询问我是否要在 meld 中打开文件进行比较。另一个只是在
我正在使用 kdiff3 作为 difftool。当我使用 git difftool 命令时,它还会向我显示完全相同的文件。甚至 kdiff3 也会 pop 一条消息,指出这些文件是“二进制相等的”(
当我执行 git difftool 时,我收到消息 Hit return to launch 'araxis':。我发现我可以通过按 CTRL-C 来终止整个比较,但是跳过单个文件怎么样? 这可能吗?
我的 ~/.gitconfig 中有以下配置 [diff] tool = vimdiff [diftool] prompt = false 当我启动 git difftool 时,它默
是否可以让 git difftool 命令打开一个目录,比较更改的文件和暂存/检查的文件? 理想情况下,如果有 2 个文件已更改,它们将是唯一显示的 2 个,但在目录比较中。 我读过有关让 git 并
我已将我的 git difftool 设置为使用 winmerge。它已经工作了很长一段时间。但是今天突然不行了。 git difftool 曾经在脏文件上一个接一个地调用 winmerge,但现在不
我已将 Meld 配置为我的 difftool。我很确定它配置正确,因为如果我这样做 git config -l ,我得到 merge.tool=meld diff.tool=meld mergeto
我正在尝试在 Windows 8.1 系统上的 Git Bash 中使用 KDiff3 作为 difftool,我承认我对 Git 很陌生。当我尝试将暂存文件与提交文件进行比较时,我无法打开 KDif
我已经将 Beyond Compare 配置为 difftool。 当我运行 $ git difftool 时,它会打开 BC 中的所有 diff 文件,但顺序是,即第一个 diff 文件打开,我必须
我使用 Windows 版 git bash 和 Beyond & Compare 作为我的差异工具(但同样的事情发生在任何外部差异工具上)。 我希望我的终端不要等待 difftool 退出以返回终端
我在文件 .gitconfig 中为 KDiff3 配置了以下 difftool, [difftool "kdiff3"] external = '"C:/Program Files/KDif
看来git difftool执行外部命令时,没有正确引用参数。 如果 .gitconfig 包含以下几行: [difftool.echo] cmd = echo "$LOCAL" "$REMOTE
我有许多新文件以及一些已添加到我的分支的修改过的文件,当我执行 git difftool master 时,它会比较所有修改过的文件并打开所有新文件。我看到类似的东西 Launching WinMer
我这样配置 git: git config --global diff.tool meld 当我运行时: git difftool 我收到以下消息: Viewing: 'hello.txt' Hit
是否可以通过 git add --patch 配置 Git 以使用我配置的 difftool? 我想通过我自己的 difftool 选择要添加到索引的更改。 最佳答案 不,不幸的是。 我想我可以看到工
默认的 git diff 行为是依次打开每个 diff 文件(在打开下一个文件之前等待上一个文件关闭)。 我正在寻找一种同时打开所有文件的方法 - 例如,在 BeyondCompare 中,这将在同一
这个问题在这里已经有了答案: Show both staged & working tree in git diff? (3 个答案) 关闭 5 年前。 有没有办法查看同一文件的 staged 和
当使用“git difftool”时,当其中一个文件是最新版本时,它会将相对路径传递给外部 diff 应用程序。 ~/.gitconfig [difftool "echo"] cmd = ec
我想在单一 View 中查看对所有文件的更改,如图所示;最好选择两个修订版并从 GUI 启动 diff。 我能得到的最接近的是启动 git difftool -t meld -d 2e9c5b 4fc
我是一名优秀的程序员,十分优秀!