git 使用 sourcetree 工具进行分支结帐需要超过 45 分钟

git branch checkout using sourcetree tool is taking more than 45 minutes

我正在使用 sourcetree 工具检查一个 git 分支,它花了很长时间 - 45 分钟。

command getting executed
git -c diff.mnemonicprefix=false -c core.quotepath=false clone --branch mybranch --recursive mygitrepourl

size of branch: 670 MB

请帮助我理解为什么结帐需要这么长时间。

git 存储库中可能存储了一个大文件(可能是二进制文件)(有时是多个版本)。

如果是这种情况,您可能必须 remove that file from the repo history 并且(在与该存储库的其他用户沟通后)执行 git push --force.

您也可以考虑对那些大文件使用 Git Large-File Storage (Git LFS)

使用 --depth 1 仅克隆最新提交 here

git clone yourlink --depth 1

使用 bitbucket。在高级选项 Clone depth 中:1