Explore Your Repository And Fix A Problem

Git said you had cloned an empty repository. This is true, your repository is empty but the directory that git created is not entirely empty. List the contents of your local repository - including the hidden files. A local repository is the copy of a repository you have on your local system. After listing the contents of your local repository, you should see something like this:

$ ls -al bb101repo/
total 0
drwxr-xr-x 3 manthony staff 102 Dec 14 10:50 .
drwxr-xr-x 3 manthony staff 102 Dec 14 10:50 ..
drwxr-xr-x 9 manthony staff 306 Dec 14 10:50 .git
$

The .git directory contains special files and directories used by the Git system. For now, you should be aware that it is there.

Notice that Git went ahead and named your repository's directory with the same name as you did when you created it. You could have cloned the repository under a totally different name. For example, you could cloned the repository to a directory called bb101repo-practice. The advantage of this name is that it provides a clue about what you were going to do with clone. In fact, it is good not to simply use the repository name when you clone but indicate what you are doing with the clone. Why don't you fix that right now:

  • Remove the repository you just created.
    rm -irf bb101repo/
                    
    
  • Reissue the clone command but this time give Git a name that indicates what you are doing.
    For example, you might want to call the clone bb101repo-practice:
    $ git clone https://newuserme@bitbucket.org/newuserme/bb101repo.git bb101repo-practice
            
    

    Again, Git will tell you that you are cloning an empty repository.

  • List your ~/repos directory, you should see something similar to the following:
    $ ls ~/repos
    bb101repo-practice
            
    

Great. Now you are ready to add content to your repository.