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 ...
Get Pragmatic Guide to Git now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.