以下是我拥有的内容 - 我的代码的git存储库:
projects
|-proj1 (no git repo here yet)
|-subproj1 <- current git repo here
这是我想要的 - 一个 Git 仓库,现在正在跟踪使用我的代码的新项目:
projects
|-proj1 <-git repo moved to here, but still tracking files in subproj1
|-subproj1 (no git repo here)
我希望保留历史记录,因此新的存储库将引用比原始文件深一级的文件。有什么最简单的方法可以做到这一点?
sed "s#\t\"*#&sub-proj1/#"
- Daniel Alder