您需要获取两个远程存储库的最新版本,并将主分支互相比较。它看起来像主枝是“树干”分支,所以你可以看到什么提交的(在“镜子”项目的主干分支,而不是)唯一的项目是这样的:
$ git log --oneline origin/trunk ^mirror/trunk
1c4fa82 1. Modified the flag name for gb_to_idx rewrite to hive.ql.rewrite.gb_to_idx So
638be54 Merge branch 'trunk' of [email protected]:prafullat/hive into trunk
72c8220 HIVE-1383. Allow HBase WAL to be disabled (John Sichi via Ning Zhang)
a372259 Checking in commented meta-data methods in GbToCompactSumIdxRewrite. It has to be unc
33c1fb1 Fixing some files due to wrong application of patch. Build now compiles !
5942728 Reverting files which were patched twice in last checkin.
5efda04 Adding inital rewrite changes. This patch adds basic query rewrite support to Hive. I
3fce190 Merge branch 'trunk' of git://github.com/apache/hive into trunk
b3f9ff2 Checking in commented meta-data methods in GbToCompactSumIdxRewrite. It has to be unc
d89deb9 Fixing some files due to wrong application of patch. Build now compiles !
11db7da Reverting files which were patched twice in last checkin.
88fee30 Adding inital rewrite changes.
ba7703f Some part of last check-in got missed.
2c5c5ae Checking initial changes for Hive indexing from He Yongqiang (Hive-417) Here is descr
或者你可以删除--oneline
以查看完整的提交消息。看起来他们都是你的。如果您不想看到这些合并提交,也可以添加--no-merges
。
接下来,您可以通过运行该得到实际的差异:
$ git diff --stat mirror/trunk...origin/trunk
README.txt | 4 +-
build.xml | 1 +
.../java/org/apache/hadoop/hive/conf/HiveConf.java | 1 +
ivy/ivysettings.xml | 4 +-
metastore/if/hive_metastore.thrift | 12 +-
.../apache/hadoop/hive/metastore/api/Index.java | 15 +-
.../hive/metastore/api/ThriftHiveMetastore.java | 671 +++++++++++++++++++-
metastore/src/gen-php/hive_metastore_types.php | 30 +-
.../hadoop/hive/metastore/HiveMetaStore.java | 155 ++++-
.../hadoop/hive/metastore/HiveMetaStoreClient.java | 9 +-
.../hadoop/hive/metastore/IMetaStoreClient.java | 14 +
.../hadoop/hive/metastore/MetaStoreUtils.java | 31 +
(bunch more lines)
ql/src/test/queries/clientpositive/index_compact.q | 13 +
.../test/queries/clientpositive/index_projection.q | 13 +
ql/src/test/queries/clientpositive/index_summary.q | 13 +
.../queries/clientpositive/ql_rewrite_gbtoidx.q | 9 +
.../results/clientpositive/index_compact.q.out | 70 ++
.../clientpositive/ql_rewrite_gbtoidx.q.out | 211 ++++++
.../primitive/PrimitiveObjectInspectorUtils.java | 29 +-
57 files changed, 4000 insertions(+), 131 deletions(-)
如果删除--stat
,你会得到实际的差异。 mirror/trunk
和origin/trunk
之间的...
是一个简短的说法,你需要在共同的祖先之间进行区别,所以它不会给你一个差异去除从开始以来添加到原始项目的所有内容,它只是给你所做的改变在你的分支上制作。
可能重复http://stackoverflow.com/questions/687450/how-do-i-compare-两个git版本库) – 2014-08-30 18:20:51
[获取两个版本库之间的差异](http://stackoverflow.com/questions/1968512/getting-the-difference-between-two-repositories) – Rumid 2017-02-16 10:27:45