项目的 Gitflow 取决于其他回购协议?

Gitflow for projects depending on other repos?

在我的项目中,我使用第 3 方 git 存储库作为库。我将它们添加到我的 .gitignore 列表中,以便我可以单独提取库。有没有办法将我项目分支中的某个提交绑定到第 3 方库中的某个提交?

将特定提交绑定到 Git 存储库更适用于子模块而不是子树:我已经说明了

所以将您的第三方库回购添加到您当前的回购

git submodule add /url/to/library library

然后检查你想要的确切提交

cd library
git checkout <SHA1>

最后回到主repo,记录主repo的新gitlink (a special entry in the index)

cd ..
git add .
git commit -m "new library SHA1"