Skip to content
GitTree
Remotes and sync

Work with limited repository history

A shallow clone downloads only the latest commits; a blobless clone downloads file contents only when needed. Both make huge repositories quick to clone. In a shallow clone the graph shows where history stops, and Fetch More History or Fetch Full History bring the rest.

FreeUpdated

Works in GitTree Free: every local Git feature, once you are signed in.

On this page
  1. Before you start
  2. Where to find it
  3. Steps
  4. Expected result
  5. What a shallow clone affects
  6. If something goes wrong
  7. Questions
  8. Related

Before you start

  • You are cloning, or working in, a very large repository.

Where to find it

  • The clone dialog: Depth, and Download file contents only when they are needed (blobless).
  • The shallow boundary row at the bottom of a shallow clone’s graph, with Fetch More History and Fetch Full History in its menu.
ActionmacOSWindows and Linux
Fetch All⌘⇧FCtrl+Shift+F

Steps

  1. Clone with limited history

    In the clone dialog, type a Depth, such as 50, to clone only the latest commits; leave it empty for Full history. Or turn on the blobless option to keep all commits but download file contents on demand.

  2. See where history stops

    In a shallow clone the graph ends with a row that says history continues on the remote.

  3. Get more when you need it

    Right-click that row: Fetch More History for more commits, or Fetch Full History to make it a normal clone.

Expected result

You work with a fast, small clone, and fetch older history only when a task needs it.

What a shallow clone affects

  • Counts such as ahead and behind, and the base of a branch, stop at the boundary.
  • File history and blame cannot see past it.
  • Fetching the full history removes every limit: GitTree says This is no longer a shallow clone.

If something goes wrong

“Enter a whole number of commits, or leave it empty for full history.”

Depth takes a number of commits, such as 1 or 50.

Questions

Shallow or blobless?

Blobless keeps every commit, so history, blame and merges work normally, and suits daily work. Shallow is smallest, and suits a quick look or a build.