如何将存储库(old_rep)作为目录移动到另一个存储库(new_rep),同时保留存储库的历史记录和文件?
以下是我从其他堆栈问题中尝试的方法。我在new_repo中有像目录、.txt、.sql文件这样带有历史记录的文件。当我运行下面的代码时,看起来--mirror正在将old_rep中的所有内容替换为new_rep。
mkdir foo
cd foo
git clone --bare ssh://git@test.test.test/test/old_rep.git
cd old_rep.git
git clone --bare ssh://git@test.test.test/test/new_rep.git
cd ..
rm -rf old_rep.git