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.
Works in GitTree Free: every local Git feature, once you are signed in.
On this page
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.
| Action | macOS | Windows and Linux |
|---|---|---|
| Fetch All | ⌘⇧F | Ctrl+Shift+F |
Steps
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.
See where history stops
In a shallow clone the graph ends with a row that says history continues on the remote.
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.