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

前端 未结 1 852
暖寄归人
暖寄归人 2020-12-05 03:05

In a repository A the folder sub is included as git subtree of the repository S - pointing to master branch.

I ha

1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-05 03:49

    If you used git subtree (and not git submodule) to create the subtree, then it's just a normal dir. To switch it to another branch, just delete it and recreate the subtree from the new branch. This is:

    git rm 
    git commit
    git subtree add --prefix=  
    

    That should work without problems.

    0 讨论(0)
提交回复
热议问题