Skip to Main Content
Pragmatic Guide to Git
book

Pragmatic Guide to Git

by Travis Swicegood
November 2010
Beginner content levelBeginner
160 pages
2h 50m
English
Pragmatic Bookshelf
Content preview from Pragmatic Guide to Git
4 Creating a Local Copy of an Existing Repository

You need to create a clone of a remote repository to start making changes to it. The git clone command initializes a new repository on your computer and fetches the entire history—all the changes that have been tracked during the life of that repository. After it’s complete, you can start making changes to the files in your local working tree and tracking commits locally.

Sometimes you don’t need the entire history of the repository. You don’t always need the last ten years of changes—the last year’s might suffice. You can use the --depth parameter to limit how many revisions you fetch. This is called a shallow repository.

There are a few limitations to this type of repository clone. For ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Pragmatic Version Control Using Git

Pragmatic Version Control Using Git

Travis Swicegood
Git Version Control Cookbook - Second Edition

Git Version Control Cookbook - Second Edition

Kenneth Geisshirt, Emanuele Zattin(EUR), Aske Olsson, Rasmus Voss
Git for Programmers

Git for Programmers

Jesse Liberty

Publisher Resources

ISBN: 9781680500028Errata