Photo by Ilya Pavlov on Unsplash
Cloning a Git repository
π‘Clone a repository into a new directory, this includes all versions of the repository and commits logs.
1.- First, you must know that the origin
is the remote repository name in the local computer, it is used to send and receive information from GitHub. Use git remote
command to show it.
git remote origin
2.- In Github, you look for the clone button, you need to copy the url into the https tab, this is the option recommended by GitHub.
3.- Enter the url copy in git clone
command, this command create a folder with the name of the repository and clone the content.
git clone https://github.com/delgadocris/ruby.git
4.- The repository has been successfully cloned with all its files.
5.- When you clone a repository, you clone the information of commit logs too.
Reference:
Β