所以,最近我想看看如果我在git中合并两个分支会发生什么。我发现this answer暗示:
git merge --no-commit --no-ff $BRANCH
那告诉我,我的分支机构之间没有变化。我认为这是合理的(我知道有人最近合并了它们),但是当我使用diff时,我得到了结果。这是完整的输出:
html 15:53:26 >> git merge --no-commit --no-ff dev_1_1
Already up-to-date.
html 15:54:33 >> git merge --no-commit --no-ff origin/dev_1_1
Already up-to-date.
html 15:54:40 >> git diff dev_1_1
diff --git a/html/sites/all/modules/client/client_feed/client_feed.module b/html/sites/all/modules/client/client_feed/client_feed.module
index 840deb8..fb88b96 100644
--- a/html/sites/all/modules/client/client_feed/client_feed.module
+++ b/html/sites/all/modules/client/client_feed/client_feed.module
@@ -743,7 +743,7 @@ function client_client_variable_info($options) {
'default' => 'production',
'description' => t('"development" or "production" (QA should be development)', array(), $options),
);
-
+
+
+/**
+ * Implements function for return select list with items.
+ *
+ * @param int $id
+ * Taxonomy term id (tid).
+ *
+ * @return array $items
+ * Array with items.
+ */
答案 0 :(得分:0)
因此,事实证明,这是因为合并来自错误的分支。如果你有两个从同一地点开始的分支:
A B
| |
| + Commit extra code
| |
这将会发生:
git checkout B
git merge --no-commit --no-ff A
# Already up to date
git diff A
# Everything from the extra commit