[英]Git remove subtree or change directory of subtree
I am trying to synchronize with updates for my subtree by doing 我正在尝试与我的子树的更新同步
git pull -s subtree react master
but the whole repo is copied into wrong folder not the one I mention while adding a new repository as a subtree. 但整个仓库被复制到错误的文件夹而不是我提到的那个,同时添加一个新的存储库作为子树。
How can I remove subtree or change directory of subtree? 如何删除子树或更改子树的目录?
To update a subtree checked out in [directory]
, I would use : 要更新
[directory]
签出的子树,我会使用:
git subtree pull -P [directory] react master
renaming the subtree folder from path1
to path2
: 将子树文件夹从
path1
重命名为path2
:
git mv path1 path2
and use path2
in all subsequent git subtree
commands 并在所有后续
git subtree
命令中使用path2
deleting the subtree at path1
: 删除
path1
处的子树:
git rm -rf path1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.