如何解决更新通过子树添加的路径
我有一个git存储库(一个Kong配置存储库,无关紧要),其中有一个名为plugins/plugin_name
的文件夹
此插件实际上在organization/plugin_name
上有自己的存储库。每次我们需要更新插件和Kong时,它都是两步工作:更新插件并更新Kong配置。回购。
Kong配置库有此评论:
Due to Heroku not being able to dynamically set variables on the build to not expose GITHUB_OAUTH_TOKEN we decided to pull plugins into Kong repository.
We are using git subtree utility. For more details on working with it please look into git subtree
它链接到this article。
这是我第一次从事这项工作,我注意到,即使该插件具有自己的存储库,它实际上是通过git subtree
添加到Kong配置库中的。我在类似
git subtree pull --prefix plugins https://github.com/org/plugin_name master --squash
,git pull -s subtree plugins/plugin_name
,git read-tree --prefix=plugins/plugin_name -u org/plugin_name
,没有任何作用。
这是Kong配置库的git配置文件
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/org/pl-kong
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
我猜该子树没有添加远程跟踪?我不知道,我读了这篇文章,但我不明白如何使用,显然我在上面尝试过的命令都是错误的。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。