【问题标题】:How to remove git subtree reference如何删除 git 子树引用
【发布时间】:2015-04-29 08:50:40
【问题描述】:

我通过

添加了一个子树
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 中的所有文件,但是path/to/example 在我通过list subtrees 时仍然出现

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

如何从 git 中删除子树 reference 以使其不再被推/拉/等等?

【问题讨论】:

    标签: git git-subtree subtree


    【解决方案1】:

    只需remove the remote,即子树引用:git remote rm example

    【讨论】:

    • 不幸的是,野外有多种子树类型。
    猜你喜欢
    • 1970-01-01
    • 2013-03-31
    • 2023-04-08
    • 1970-01-01
    • 1970-01-01
    • 2019-05-12
    • 2019-02-05
    • 2014-11-24
    • 2013-06-03
    相关资源
    最近更新 更多