Search code examples
githubsourcetree

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


I am checking out a git branch using sourcetree tool and its taking a way long - 45 minutes.

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

size of branch: 670 MB

please help me to understand why its taking so long to checkout.


Solution

  • It is possible that a large file (possible a binary one) has been stored (sometimes in multiple versions) in the git repo.

    If that is the case, you might have to remove that file from the repo history and (after communicating with other users of that repo) do a git push --force.

    Also you might consider using Git Large-File Storage (Git LFS) for those big files.