How to Clone a Git Repository?
I Know How to Clone a Git Repository to My System, Using Git Clone. I Cloned a Repository Using That Command: Git Clone Name>/ but When I Tried to Clone That...
I know how to clone a git repository to my system, using git clone. I cloned a repository using that command:
git clone name>/<repository name>
But when I tried to clone that repository again, which have been changed recently, I got this error message:
fatal: destination path '<repository name>' already exists and is not an empty directory.
2 Answers
This is because cloning is used for creating the directory, setting it up for use with git, and copying the files into it. Since you already have files in that directory, it could be unwise to replace something in it that you might have put hours of work into, so it won't allow that.
You have two options:
Must Read
Updating to the latest files
cd repository-name
git pull