Cloning an existing Repository git?

897    Asked by KrithikaBhatt in Devops , Asked on Dec 10, 2019
Answered by Krithika Bhatt

The command line git clone command takes two arguments — the repository specification, and the destination target folder (aka ‘directory’). The repository spec is usually a URL, e.g.,

git clone https://github.com/user/user-project myfolder

To get an idea of the full power of git clone, use git help clone, or do a man git-clone like I did.

Of course the usual method is to just change your working directory to your desired location and use git clone with a single parameter:

cd myfolder

git clone https://github.com/user/user-project


Your Answer

Interviews

Parent Categories