【发布时间】:2021-11-24 14:48:12
【问题描述】:
我一直在使用 git subtree 在我们主项目的文件夹中嵌入一个 repo。我不确定发生了什么,但现在推送子树无法更新远程仓库。
我用来推送的命令是:
git subtree push --prefix themes/natra https://github.com/OpenSID/tema-natra.git premium
错误信息是:
fatal: ambiguous argument '3f44cc87ceb87df1d9171096596a824fc3050a27^{commit}': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
could not rev-parse split hash 3f44cc87ceb87df1d9171096596a824fc3050a27 from commit 8577911bf6183497cc246aa620e7be1b6becec29
我在 repo 中找不到提交/哈希 3f44cc87ceb87df1d9171096596a824fc3050a27。在下面的 gitx 图像Commit is git-subtree-split 中,我可以看到提交是一个 git-subtree-split。但它似乎不再存在于 repo 中。
如何绕过这个明显丢失的提交或从中恢复?任何帮助将不胜感激。
【问题讨论】:
-
这可能是
git subtree中的一个错误,其中有一些已知错误。有关详细信息,请参阅 Git 邮件列表存档。据我所知,目前没有人积极维护git subtree。 -
感谢@torek 提供的信息。由于我无法帮助调试
git subtree,看来我需要考虑替换git subtree的使用。