gpt4 book ai didi

Git 日志不显示子模块更改

转载 作者:太空狗 更新时间:2023-10-29 13:15:22 24 4
gpt4 key购买 nike

<分区>

我在 master 上有一个提交,哈希值 6877146,它更新了一个子模块。

$ git show 6877146
commit 6877146f1781bfbd4ec3ae2a27121a606f5f688e
Author: [snip]
Date: Wed Feb 22 16:10:20 2012 +0000

updating potatobase

diff --git a/potatobase b/potatobase
index 5877e2c..b77ba62 160000
--- a/potatobase
+++ b/potatobase
@@ -1 +1 @@
-Subproject commit 5877e2c2d82645fa44f121884291ee48cf24584d
+Subproject commit b77ba624d6a1c5e62d434ad2d06383604aeab431

这次提交在 master 分支上,我目前已经 checkout :

$ git branch -a --contains 6877146
* master
remotes/origin/HEAD -> origin/master
remotes/origin/master
remotes/origin/ticket-1479-refactor-blade-json-functions

但是,在子模块上执行 git log 不会显示提交:

$ git log potatobase | grep 6877146
$

如果我明确地 checkout 此提交,它会在日志中:

$ git checkout 6877146
$ git log potatobase | grep 6877146
commit 6877146f1781bfbd4ec3ae2a27121a606f5f688e

为什么当我 checkout master 时这个提交没有显示在日志中?它已经 merge 到 master 中:

$ git checkout master
$ git merge 6877146
Already up-to-date.
$

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com