Trying to bare clone a repo - but only got an empty repo at local

161 Views Asked by At

I'm using M2 Macbook. I'm trying to bare clone this repo for a school assignment. Not sure what I did wrong, but what I get at local is totally different from the GitHub repo.

but every time I tried to bare clone an repo, it seems like I only got an empty repo.

This might be the reason that caused the issue but I'm not sure:

The first time I tried to bare clone the repository, instead of the cloning the correct assignment repository, I accidentally used a wrong URL that pointed to an empty repository I created in my own GitHub, which looked exactly like the one in above pic you see. Then I used command+delete to manually delete that whole folder on my desktop before tried to bare clone the correct repository.

I tried to bare clone different repositories but had the same issue - no matter what repositories I bare cloned, I got the same wrong stuff as in the screenshot above.

I'm not too familiar with git - tried different ways found on Google but failed.

Please help me! Thank you!

1

There are 1 best solutions below

3
torek On

That is what a bare clone looks like.

It's not at all clear to me why you're making a bare clone in the first place. Users should never make bare clones. Bare clones exist so that servers can serve Git repositories. They are no good for doing any actual work; they are only good when acting as a server that receives work done elsewhere.