We can't find the internet
Attempting to reconnect
因为随着项目越来越庞大, 慢慢的需要将项目的不同目录分离出去, 想要保留对应的目录提交记录.
# 克隆项目 git clone ... # 创建一个分支 git checkout -b newrepo # 使用git filter-branch过滤提交 git filter-branch --prune-empty --subdirectory-filter subdirectory newrepo # 分支被重建后, 只有对应的目录的提交和内容, 将分支提交到新的项目 git remote add newrepo url git push new repo newrepo:main
执行完成后, 新的项目便导出成功了