2

I searched earlier questions before asking here and found but the proposed solution which worked did not work for me.

After clone operation, I see empty folder although it seems that lots of files have been downloaded.

git clone git@git.assembla.com:optival.git
Cloning into 'optival'...
remote: Counting objects: 611, done.
remote: Compressing objects: 100% (468/468), done.
remote: Total 611 (delta 157), reused 541 (delta 122)
Receiving objects: 100% (611/611), 9.31 MiB | 560.00 KiB/s, done.
Resolving deltas: 100% (157/157), done.
Checking connectivity... done.

When I open folder 'optival', I see that it is empty. Same question has been asked before:

the git clone is empty? why this happens

I read and changed my branch where code exists but result is same after clone operation

Community
  • 1
  • 1
kadir_beyazli
  • 197
  • 2
  • 12
  • wich Plaform is used (Windows, Linux,...)? – Oswald Aug 24 '16 at 13:57
  • It is obvious that both `master` and other branches are empty. – Andrejs Cainikovs Aug 24 '16 at 13:58
  • `I read and changed my branch where code exists but result is same after clone operation` - So, after cloning, did you go into the folder and do a checkout of another branch? Cloning will always pull down the `master` branch. It's up to you to checkout the correct branch. – J. Titus Aug 24 '16 at 13:59
  • You can run `git log` and see if there has been any activity on the branch that you have checked out (the one which you think has code). – Amit Aug 24 '16 at 14:00
  • @Oswald I am using Ubuntu. J. Titus I cloned after changing branch but result is same. Amit when I write "git log", it writes : fatal: bad default revision 'HEAD' – kadir_beyazli Aug 24 '16 at 14:19
  • Please make sure that the files are not being ignored, check the contents of `.gitignore` – Daniel Kravetz Malabud Aug 24 '16 at 15:23

1 Answers1

1

It is totally possible and plausible that the repository you're cloning doesn't have any file on the working tree on the branch master at the revision you're checked at, or any visible file at least (check with ls -a if there are hidden files).

You can check the git log to see the recent modifications, as if someone erased all the file.

blue112
  • 52,634
  • 3
  • 45
  • 54