Loading tutorials
Intermediate · Mid: 15 chapters · 36 min read. States assumed prerequisites
Start readinggit clone, git fetch, git commit, and git branch from the command line. You should also have a rough idea that Git stores commits, trees, and blobs. This chapter makes that idea precise, because every later technique in this tutorial (shallow clones, partial --depth works, what it saves, and what it takes away.git log, and that you know a commit points to its parent commits. A shallow clone cuts that chain of parents at a chosen depth. Commands that walk history then behave differently, and some fail.--depth) holds only the most recent commits. Here you will learn how to add history to a shallow clone when you need it, and how to turn it into a full clone.--filter option on git clone. Here you will see how a partial clone finds the objects it left behind.--filter=blob:none option and know that Git stores commits, trees, and blobs. Here you will combine a partial clone with sparse checkout so that a large monorepo costs you little in both downlgit clone, git fetch, and git config. It also assumes you know that Git stores commits, trees, and blobs, and that you have seen --filter used in an earlier chapter. Here you will learn what the remote must support for filtered clones to work and how --depth, --filter, and sparse checkout in earlier chapters. Here you pick among them based on what you need to do with the repository.--depth, --filter, and sparse checkout in earlier chapters. A CI job usually needs the current files and, sometimes, a little history. A full clone pays for far more than that on every run.