如何移除Git子树引用?

11

我通过添加一个子树

git subtree add --prefix=path/to/example --squash git@github.com:johndoe/example.git master

我想把它删除。 没有git subtree rm 命令。 我已经删除了path/to/example 中的所有文件,但是当我通过列出子树时,path/to/example 仍然出现。

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

我该如何从git中删除子树reference,以使其不能再被推送/拉取等操作?

1个回答

6

只需删除远程引用,即子树引用:git remote rm example

。相关内容可参考此处


野外存在多种子树类型,不幸的是。 - Vladius

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接