查看分支与融合的差异? [英] View differences of branches with meld?

查看:109
本文介绍了查看分支与融合的差异?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道我可以通过 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:


  1. 重命名工作副本文件夹

    例如 mv / projectA / projectA_master


  2. 克隆项目
    git clone url


  3. 切换到 devel
    cd projectA && git -b devel origin / devel


  4. 查看与meld <
    meld / projectA_Master projectA

  1. Rename folder of working copy
    For example mv /projectA /projectA_master)
  2. Clone the project again
    git clone url
  3. Switch to devel branch
    cd projectA && git -b devel origin/devel
  4. 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆