Clone Git repository

Hello, hope someone can help me…I am currently Practicing Git Basics and I am stuck on step 6: That’s it! You have successfully connected the repository you created on GitHub to your local machine. To test this you can cd into the new git_test folder that was downloaded with git clone and enter git remote -v in your command line. This will display the url of the repository you created in GitHub as your remote. You may have also noticed the word origin at the start of the git remote -v output. This is the name of your remote connection, it could have been named anything for example “party-parrot” or “dancing-banana” but origin is both the default and the convention. (Don’t worry about the details of origin for now, it will come up again near the end of the tutorial.)

I have cloned the repository using the Terminal commands but when I enter git remote -v to test it I get this message: fatal: not a git repository (or any of the parent directories): .git

What did I do wrong? Thanks.

Did you cd into the cloned directory?

2 Likes

No I didn’t so thanks for the help as it worked :slight_smile:

1 Like

I have successfully cloned the repository on to my machine, but when I try to cd into the directory (git_test) I get the following:

bash cd: No such file ore directory

However when I ls I can see the repository directory that I cloned into the folder.

So I have a folder named gitHub in which I cloned my repository folder into named git_test. I can’t seem to cd into git_test and therefore when I type in the command git remote -v I get an error as well.

Nevermind. I managed.

For some reason the entire time whenever I need to cd I use as per the initial instructions
cd ¬/ where I want to change to

This always worked but now in the case above it would not. Turns out however (in Xubuntu) you can just type cd name of directory and it will work.

Good to know. Still unsure why the original way did not work this time but worked every other time.