How to fix fatal: Server does not support --shallow-since in Git

GitINTERMEDIATELOWUpdated Dec 2, 2025ยท 157 views

This error occurs when attempting to clone a repository with --shallow-since on a Git server that doesn't support this feature. The server either runs an older Git version or uses a "dumb" HTTP transport that lacks shallow clone capabilities.

Quick fix

Fixes fatal: Server does not support --shallow-since

# Instead of date-based shallow clone
git clone --depth=100 <repository-url>

# Or for more recent history
git clone --depth=50 <repository-url>
  1. Use --depth instead of --shallow-since
  2. Verify server Git version and protocol support
  3. Try SSH instead of HTTPS
  4. Iteratively deepen a shallow clone to approximate date-based cloning
git โ€” error
# Instead of date-based shallow clone
git clone --depth=100 <repository-url>
# Or for more recent history
git clone --depth=50 <repository-url>
fatal: Server does not support --shallow-since

What this error means

The --shallow-since option was introduced in Git 2.16+ as part of protocol version 2, allowing you to create shallow clones that include only commits after a specific date. This is more flexible than --depth because it lets you specify "commits from the last 6 months" rather than "the last 100 commits." However, this feature requires both client and server support. When a Git server doesn't advertise the "deepen-since" capability in its protocol negotiation, clients cannot use --shallow-since. This commonly happens with older Git installations (pre-2.16), servers using "dumb" HTTP transport (which doesn't support any shallow operations), or certain managed Git hosting services that haven't enabled protocol v2 features. The error is a protocol-level rejection happening during the initial handshake, before any repository data is transferred. Git detects the missing capability early and fails fast rather than attempting a full clone.

Typical symptoms

  • git clone --shallow-since=<date> command fails immediately
  • Error message explicitly mentions "Server does not support --shallow-since"
  • Same repository clones successfully without the --shallow-since flag
  • git fetch --shallow-since fails on existing repositories with similar error
  • CI/CD pipelines using shallow clones by date suddenly fail after server upgrades or migrations

Common causes

  1. Remote Git server runs a version older than 2.16 (released January 2018)
  2. Server uses "dumb" HTTP transport instead of "smart" HTTP or SSH protocols
  3. Git hosting service has disabled protocol v2 features for performance or compatibility reasons
  4. Corporate firewall or proxy strips protocol v2 negotiation headers
  5. Server-side Git configuration explicitly disables shallow clone features
  6. Repository was migrated from another VCS (SVN, Mercurial) and shallow operations aren't fully supported

How to fix "fatal: Server does not support --shallow-since"

1Use --depth instead of --shallow-since

The most reliable workaround is to use commit count-based shallow cloning, which has universal support:

bash
# Instead of date-based shallow clone
git clone --depth=100 <repository-url>

# Or for more recent history
git clone --depth=50 <repository-url>

This creates a shallow clone with the specified number of commits from each branch tip. While less precise than date-based cloning, it works on all Git servers.

2Verify server Git version and protocol support

Check what capabilities the remote server advertises:

bash
# For HTTP/HTTPS repositories
git ls-remote --symref <repository-url>

# Check if protocol v2 is supported
GIT_TRACE_PACKET=1 git ls-remote <repository-url> 2>&1 | grep "version"

If you see "version 2" in the trace output, the server supports protocol v2. If not, it's using the older protocol which may not support --shallow-since.

3Try SSH instead of HTTPS

Some servers support shallow-since over SSH but not HTTPS due to transport configuration:

bash
# Convert HTTPS URL to SSH
# Instead of: https://github.com/user/repo.git
git clone --shallow-since="2024-01-01" git@github.com:user/repo.git

# For other hosts
git clone --shallow-since="1 year ago" ssh://git@gitlab.com/group/project.git
4Iteratively deepen a shallow clone to approximate date-based cloning

If you need commits from a specific date but must use --depth, you can incrementally deepen:

bash
# Start with shallow clone
git clone --depth=50 <repository-url>
cd <repository-name>

# Check the oldest commit date
git log --reverse --format="%ai" | head -1

# If the date is too recent, deepen the clone
git fetch --deepen=50

# Check again and repeat until you reach your target date
git log --reverse --format="%ai" | head -1

This is more manual but achieves similar results to --shallow-since.

5Perform a full clone if shallow cloning is not critical

If disk space and bandwidth aren't major constraints, a full clone is the most compatible approach:

bash
git clone <repository-url>

For CI/CD environments where you only need recent commits, evaluate whether the time saved by shallow cloning justifies the complexity when server support is unreliable.

Advanced notes

Protocol v2 brought significant improvements to Git's wire protocol, including server-side filtering (refs/for filtering), which reduces bandwidth for monorepos. The --shallow-since feature specifically uses the "deepen-since" command internally, which is equivalent to "git rev-list --max-age=<timestamp>" on the server side.

Date formats for --shallow-since are flexible: "2024-01-01", "1 week ago", "6 months", and ISO 8601 timestamps like "2024-12-03T15:12:47Z" all work. Git parses these using the same date parsing logic as git log --since.

For self-hosted Git servers, ensure you're running Git 2.16 or later and that protocol.version=2 is enabled in the server configuration. GitHub, GitLab, and Bitbucket Cloud all support protocol v2 by default as of 2019, but on-premises installations may need manual enablement.

In CI environments (GitHub Actions, GitLab CI, CircleCI), shallow cloning with --depth=1 is often the default for performance. If you encounter this error in CI, check if the repository is being accessed through a caching proxy or mirror that doesn't support newer protocol features.

Frequently asked questions

What does "fatal: Server does not support --shallow-since" mean?
16+ as part of protocol version 2, allowing you to create shallow clones that include only commits after a specific date. " However, this feature requires both client and server support. When a Git server doesn't advertise the "deepen-since" capability in its protocol negotiation, clients cannot use --shallow-since.
How do I fix "fatal: Server does not support --shallow-since"?
This error occurs when attempting to clone a repository with --shallow-since on a Git server that doesn't support this feature. The server either runs an older Git version or uses a "dumb" HTTP transport that lacks shallow clone capabilities.
What causes "fatal: Server does not support --shallow-since"?
Remote Git server runs a version older than 2.16 (released January 2018) Server uses "dumb" HTTP transport instead of "smart" HTTP or SSH protocols Git hosting service has disabled protocol v2 features for performance or compatibility reasons
Is the "fatal: Server does not support --shallow-since" error serious?
It is a low-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading