如何将 git repo 的文件夹拆分为单独的分支?

编程入门 行业动态 更新时间:2024-10-13 06:18:37
本文介绍了如何将 git repo 的文件夹拆分为单独的分支?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

我负责将我们的 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屋!

更多推荐

[db:关键词]

本文发布于:2023-04-30 18:04:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1398143.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何将   分支   文件夹   repo   git

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!