Cloning a Remote Repository
Learn how you can clone a remote repository.
We'll cover the following
Cloning#
In this chapter, you’re going to play with your repository by deleting its content, and then explore what your options are to recover the state.
1 mkdir lgthw_git_clone
2 cd lgthw_git_clone
3 git clone https://github.com/ianmiell/shutit
4 cd shutit
5 ls .git
Cloning problems?
If you have problems cloning from GitHub, you can replace the clone with any URL you can access within your network.
There’s a .git
folder, just as before. Remember that:
ALL GIT REPOSITORIES ARE BORN EQUAL!
Local and remote repository#
This is a Git repository. It is the same as the one you’ve cloned, and you own it. Its only connection with the repository that you cloned from can be seen if you run:
6 grep -A2 'remote "origin"' .git/config
You will see a new section that indicates where this Git repository was cloned from, and it gives that remote a name by default: origin.
Introduction: Clone a Repository
Accidental Deletion
Mark as Completed
Report an Issue