Search code examples
gitgit-clone

Are git clone receiving object and checkout the same


I was going through an article which said:

During the git clone, you'll find that checkout takes a long long time.

I don't know what that meant by 'checkout'. Does it mean 'Receiving objects'? I was cloning a repo and this is the outcome on the cmd prompt:

git clone [email protected]:dir
Cloning into 'dir'...
remote: Counting objects: 251877, done.
remote: Compressing objects: 100% (115770/115770), done.
Receiving objects:  22% (57476/251877), 185.21 MiB | 53.00 KiB/s

Solution

  • Git clone is a two step process (by default):

    1. all git objects and refs are downloaded (I.e., the .git directory is populated; this is the receiving objects step)
    2. the working tree is checked out (normally the remote HEAD)