git - 如何删除 git 子树引用

标签 git git-subtree subtree

我通过

添加了一个子树
git subtree add --prefix=path/to/example --squash git@github.com:johndoe/example.git master

并想删除它。 There's no git subtree rm command.我已经删除了 path/to/example 中的所有文件,但是当我 list subtreespath/to/example 仍然出现通过

git log | grep git-subtree-dir | awk '{ print $2 }'

如何从 git 中删除子树 reference 以便它不再被推/pull 等?

最佳答案

简单remove the remote ,这是子树引用:git remote rm example

关于git - 如何删除 git 子树引用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28751575/

相关文章:

wordpress - 在 SSH 中使用 Git pull 特定目录

git - 如何在 TRAMP 环境中为 Git 设置不同的作者/提交者?

Git说本地分支在远程分支后面,但事实并非如此

git - 为什么 git subtree merge 不删除文件?

git 子树 : possible to change subtree branch/path in a forked repository?

git - git 过滤器分支和 git 子树之间的区别?

c++ - 如何命名同时充当其他集合容器的 B+Tree 键/值映射集合

c# - 在 .Net dll 中嵌入 git commit hash

sql - 从子树(PostgreSQL ltree)查询中选择根节点,返回几个后代

algorithm - 寻找最小子树