gpt4 book ai didi

git - 恢复 git-svn 克隆

转载 作者:IT王子 更新时间:2023-10-29 01:22:33 24 4
gpt4 key购买 nike

我开始使用 git-svn 的克隆操作克隆一个 SVN 存储库。导入大约 6 小时后(这是一个很大的 repo ),我的电脑跑到我身上 sleep 了。有没有办法在不重做所有初始工作的情况下恢复操作?

最佳答案

用于恢复 git svn clonegit svn fetch 命令已被多个来源证实:

(Incidentally, if during the initial clone step your connection dies or you need to stop it then to resume the clone you just have to run the above command to resume downloading the history).

There seems to be a memory leak in git-svn. The size of the git-svn process grew slowly and after about two weeks it was at 1.2 GB resident size, at which point the OS refused to let it fork.
Thing is, this was a blessing in disguise.
I was able to resume the interrupted clone with a simple "git svn fetch", and it ran much faster with the now radically smaller heap.
This, worked so well, in fact, that I got into the habit of interrupting and restarting the process every evening and every morning. A few days later it was done.

You start your adventures with git-svn by cloning an existing Subversion repository:

git svn clone url://path/to/repo -s

The -s flag assumes that your repository uses the "trunk, branches, tags" convention. If not, you have to specify manually which directories represent branches and tags, if you want Git to know about them.

This will take a long time, as it will fetch every single revision from SVN and commit locally. If for any reason it stops, you can resume with git svn fetch.

关于git - 恢复 git-svn 克隆,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2676912/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com