Warning: You appear to have cloned empty repositor

2019-02-21 10:06发布

问题:

I am given a http git repository url along with username and password. I installed git and tried to clone the repository using Tortoisegit but somehow it is not working. These are the screenshots:

After I hit OK i am asked for username and password. I entered that and then I get this screenshots:

I am new to git and never used git before. I am totally clueless why is this happening. Can anybody help me out? At the end I get success does that mean the server repository itself is empty or am I missing something?

回答1:

This is a warning that no commits have been made to the repository yet. Are you sure this is the repository you intended to clone?



回答2:

This happens when you are cloning a freshly created repository with no commits.

As it says, it is just a warning. If it is expected that there is nothing in the repository, you can go ahead and add files and commit and push back.

If it is not supposed to be empty, contact the person/admin who gave you the link.