如何将 git repo 的文件夹拆分为单独的分支? [英] How to split folders of a git repo into separate branches?

查看:32
本文介绍了如何将 git repo 的文件夹拆分为单独的分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我负责将我们的 TFS 存储库转换为 git(通过 这件事).TFS 存储库是这样设置的:

I've been charged with converting our TFS repo over to git (via this thingy). The TFS repo is set up thus:

$/root
    /branch1
    /branch2
    /branch3

...等,TFS 分支作为文件夹出现在导入的 git repo 中.有没有办法将每个 branchX 拆分为 git repo 的一个分支,使内容成为新的根?

...etc, with the TFS branches appearing in the imported git repo as folders. Is there a way of splitting each branchX off as a branch of the git repo, making the contents the new root?

推荐答案

有一个工具叫做 git-subtree 正是这样做的.

There's a tool called git-subtree doing exactly that.

这篇关于如何将 git repo 的文件夹拆分为单独的分支?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆