如何将 Github Repo 连接到 Java 程序并计算差异?
How to Connect Github Repo to Java program and calculate the diff?
有人可以帮我将 github 回购连接到 java 程序。
我想使用 java 代码获取最新提交和最新标记提交之间的差异。
您可以使用 Comparing commits GitHub REST API 来计算提交差异。
For example, this URL uses the shortened seven-character SHA codes to
compare commits c3a414e
and faf7c6f
:
https://github.com/github/linguist/compare/c3a414e..faf7c6f
.
如果你使用 Accept
header application/vnd.github.v3.diff
结果会像
diff --git a/README.md b/README.md
index 50561f3..fcc4164 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
# sandbox
just playing around don’t mind me.
+
+test
....
有人可以帮我将 github 回购连接到 java 程序。
我想使用 java 代码获取最新提交和最新标记提交之间的差异。
您可以使用 Comparing commits GitHub REST API 来计算提交差异。
For example, this URL uses the shortened seven-character SHA codes to compare commits
c3a414e
andfaf7c6f
:https://github.com/github/linguist/compare/c3a414e..faf7c6f
.
如果你使用 Accept
header application/vnd.github.v3.diff
结果会像
diff --git a/README.md b/README.md
index 50561f3..fcc4164 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,5 @@
# sandbox
just playing around don’t mind me.
+
+test
....