Problem with cloning on Mac OS.

I am new to Git. Our team uses Gitlab for our project and when I use windows everything works for me. But on Mac OS, when cloning, the project folders are copied to my hard drive, but they are empty, do not take up space. In other words, the project folder hierarchy is preserved and the files in the folders are present, but empty. I created id_rsa.pub key, registered it in my Gitlab profile.

1 Like

Hi,

can you share the CLI commands you are using to clone the repository on your local disk?

To get a better picture, can you also share the following version details:

  • macOS version (sw_vers)
  • git CLI version (git --version)

Use tree or ls -lahR on the directory to create a tree list, and post an excerpt here please too (remove sensitive data from file names).

Cheers,
Michael

I use Mac Os Big Sur version 11.5.
git version 2.30.1 (Apple Git-130)
For cloning I use command in terminal git clone ssh://git@link.git

I executed the command ls -lahR

Result:
bender@MBP-Aleksej sh006 % ls -lahR
total 24
drwxr-xr-x 9 bender staff 288B Jul 24 21:09 .
drwxr-xr-x 8 bender staff 256B Jul 24 21:09 …
drwxr-xr-x 12 bender staff 384B Jul 24 21:09 .git
-rw-r–r-- 1 bender staff 127B Jul 24 21:09 .gitattributes
-rw-r–r-- 1 bender staff 158B Jul 24 21:09 .gitmodules
drwxr-xr-x 3 bender staff 96B Jul 24 21:09 background
drwxr-xr-x 8 bender staff 256B Jul 24 21:09 characters
-rw-r–r-- 1 bender staff 131B Jul 24 21:09 sc001_sh006.blend
drwxr-xr-x 3 bender staff 96B Jul 24 21:09 sound

./.git:
total 40
drwxr-xr-x 12 bender staff 384B Jul 24 21:09 .
drwxr-xr-x 9 bender staff 288B Jul 24 21:09 …
-rw-r–r-- 1 bender staff 23B Jul 24 21:09 HEAD
-rw-r–r-- 1 bender staff 345B Jul 24 21:09 config
-rw-r–r-- 1 bender staff 73B Jul 24 21:09 description
drwxr-xr-x 15 bender staff 480B Jul 24 21:09 hooks
-rw-r–r-- 1 bender staff 2.5K Jul 24 21:09 index
drwxr-xr-x 3 bender staff 96B Jul 24 21:09 info
drwxr-xr-x 4 bender staff 128B Jul 24 21:09 logs
drwxr-xr-x 4 bender staff 128B Jul 24 21:09 objects
-rw-r–r-- 1 bender staff 114B Jul 24 21:09 packed-refs
drwxr-xr-x 5 bender staff 160B Jul 24 21:09 refs

./.git/hooks:
total 120
drwxr-xr-x 15 bender staff 480B Jul 24 21:09 .
drwxr-xr-x 12 bender staff 384B Jul 24 21:09 …
-rwxr-xr-x 1 bender staff 478B Jul 24 21:09 applypatch-msg.sample
-rwxr-xr-x 1 bender staff 896B Jul 24 21:09 commit-msg.sample
-rwxr-xr-x 1 bender staff 4.5K Jul 24 21:09 fsmonitor-watchman.sample
-rwxr-xr-x 1 bender staff 189B Jul 24 21:09 post-update.sample
-rwxr-xr-x 1 bender staff 424B Jul 24 21:09 pre-applypatch.sample
-rwxr-xr-x 1 bender staff 1.6K Jul 24 21:09 pre-commit.sample
-rwxr-xr-x 1 bender staff 416B Jul 24 21:09 pre-merge-commit.sample
-rwxr-xr-x 1 bender staff 1.3K Jul 24 21:09 pre-push.sample
-rwxr-xr-x 1 bender staff 4.8K Jul 24 21:09 pre-rebase.sample
-rwxr-xr-x 1 bender staff 544B Jul 24 21:09 pre-receive.sample
-rwxr-xr-x 1 bender staff 1.5K Jul 24 21:09 prepare-commit-msg.sample
-rwxr-xr-x 1 bender staff 2.7K Jul 24 21:09 push-to-checkout.sample
-rwxr-xr-x 1 bender staff 3.6K Jul 24 21:09 update.sample

./.git/info:
total 8
drwxr-xr-x 3 bender staff 96B Jul 24 21:09 .
drwxr-xr-x 12 bender staff 384B Jul 24 21:09 …
-rw-r–r-- 1 bender staff 240B Jul 24 21:09 exclude

Hi,

Odd, a few bytes for the first file sc001_sh006.blend. Is this the only file on the root level, or are there more on the server?

This could mean 2 possible routes to debug further.

  • Your disk / filesystem is full.
  • The clone via SSH is intercepted by “somthing”

I see that there is a config file for Git submodules, maybe that’s the actual problem.

 -rw-r–r-- 1 bender staff 158B Jul 24 21:09 .gitmodules

Try initializing and updating the submodules with

$ git submodule init && git submodule update

Or you add --recursive to the git clone command on a fresh clone, that works as well.

Cheers,
Michael

I solved the cloning problem. It was necessary to install the git-lfs plugin.