Git ContributeLesson 32Free preview
Git Clone from GitHub
This lesson is part of Git · All levels
Summary
Git clone copies the entire repository from the remote to the local computer, including all commit history and all references. The result of an automatic clone has a remote named origin and is in a folder named after the repository. For very large repositories, there is a shallow clone option with --depth.
Key points
- Git clone <url> copies the complete repository to local
- The resulting automatic clone sets the origin as remote
- Clone result folder name followed by repository name
- Git clone --depth 1 performs shallow clone without full history
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.