查看分支与融合的差异? [英] View differences of branches with meld?
问题描述
我知道我可以通过 meld。
查看HEAD和当前状态之间的区别。但是,如何查看分支之间的差异,例如 master
和 devel
与meld?
I know that I can view the difference between HEAD and current state with meld .
. But how can I view the differences between branches, for example master
and devel
with meld?
目前我执行以下步骤:
At the moment I do the following steps:
- 重命名工作副本文件夹
例如mv / projectA / projectA_master
) - 克隆项目
git clone url
- 切换到
devel
cd projectA && git -b devel origin / devel
- 查看与meld <
meld / projectA_Master projectA
- Rename folder of working copy
For examplemv /projectA /projectA_master
) - Clone the project again
git clone url
- Switch to
devel
branch
cd projectA && git -b devel origin/devel
- View differences with meld
meld /projectA_Master projectA
不是有更简单的方法来获得相同的结果吗?我只需要审查这些变化,而不是主要用于合并。
Isn't there an easier way to get the same result in meld? I only need it to review the changes and not primarily for merging.
推荐答案
我也发现这个问题很烦人,所以我做了git meld,它允许更为舒适的方式将任意提交区分为工作树或暂存区域。你可以在 https://github.com/wmanley/git-meld 找到它。这有点像Mark的脚本,但是可以用来比较任何提交或暂存区域或工作目录与其他任何提交。如果你正在比较的东西之一是工作树,那么它也是可读写的,所以你不会失去你的改变。
I also found this issue annoying so I've made git meld which allows a more comfortable way of diffing arbitrary commits against the working tree or the staging area. You can find it at https://github.com/wmanley/git-meld . It's a bit like Mark's script but works for comparing any arbitrary commit or the staging area or the working directory against any of the others. If one of the things you are comparing against is the working tree then that is read-write also so you don't lose your changes.
这篇关于查看分支与融合的差异?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!