Recommended Free Tools
Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
To make a complete local copy of a large Git repository, use an unfiltered mirror clone from a verified source URL: git clone --mirror <verified-repository-url> <destination.git>. This preserves the source’s refs and object contents without creating a working tree. If you only need selected paths or want to reduce the initial download, a filtered clone can help—but it is not a self-contained full copy.
The important distinctions are ref coverage, object completeness, checkout size, and offline availability. A mirror is useful for preserving and inspecting repository data; a partial or shallow clone makes intentional compromises. Git’s clone documentation describes these options and their effects.
As an Amazon Associate I earn from qualifying purchases.
What does a mirrored Git clone contain?
A mirror clone is a bare repository configured to map all refs from the source, not just the ordinary branch heads selected by a typical working clone. It stores Git’s repository data, including the objects those refs point to, but it does not arrange project files into a browsable working directory. That makes it useful for mirror maintenance, ref inspection, and repository analysis—not for editing files directly in the mirror.
“Complete” has limits worth spelling out. An unfiltered mirror clone gives you the Git objects and refs fetched from the source at clone time. It does not automatically include payloads stored separately through Git Large File Storage (LFS), nor does a local consistency check prove that the copy matches every detail of a source repository you cannot independently compare. If the source uses LFS, handle those objects separately.
Popular on Amazon
- 【90 Degree Full Function USB C Adapter】Supports the latest USB4 standard for up to 40Gbps of bandwidth, 8K video support, and up to 240W Fast charging; Support USB PD 3.1 Extended Power Range (EPR) including 140W, 180W and 240W. Your productivity is easily doubled. *Warm Tip: For the best fit, please make sure the USB-C port is fully exposed; thick or bulky cases may affect compatibility.
- 【Reliable Quality】Made from high-quality, scratch-resistant aluminum alloy, delicate metal frame. get excellent wear resistance and heat dissipation. Non-Slip Design for easier insertion and removal.
- 【Small and portable】Ultra thin size, ultra compact design, a petite physique that matches the minimalist design of your modern laptops. Coming with a slim figure that won't block the port next to the one it's plugged into.
- 【Compatibility】Widely work with most usb c, thunderbolt 4/3 devices. Compatibilit for ROG Ally, Steam Deck, Switch, MacBook Pro, Quest 3 VR headset, Surface Book 2, iPhone 18/17/16/15, Samsung Galaxy S23/S22/S21, Note 20/10, Google Pixel, ChromeBook, etc.
- 【Excellence Customer Support】If you experience any issues or cable failure, simply reach out to our dedicated customer service team. We provide a prompt response within 18 hours, providing you with the necessary technical support to resolve any concerns.
A mirror’s ref mapping is designed for mirroring: Git documents that mirror refs are set up to be overwritten by updates from the remote. Treat the mirror as a preservation or inspection copy, not as a safe place to develop independent branches. Create a separate working clone or worktree for normal file editing.
How do I safely clone a large repository?
First decide whether you need a complete local archive or a smaller working copy. If completeness and offline access matter, use an unfiltered mirror clone; if transfer size matters more, choose a partial or shallow clone with the trade-offs understood.
- Confirm the source and destination. Check that the repository URL is the one you intend to copy, and choose a new, clearly named destination. Avoid accidentally targeting an existing repository or a path that contains data you need to keep. If the URL contains credentials, do not paste it into shared logs or notes.
- Plan for storage. A bare mirror avoids expanding the project into a working tree during the clone itself, but it still needs space for the full fetched object database. If you later create a checkout, allow for that additional expansion. A single reported repository-size number cannot describe every storage cost.
- Clone without depth or filters when completeness is the goal. Run:
git clone --mirror <verified-repository-url> <destination.git>Do not add
--depthor--filterto a command intended to create a complete local copy. Depth limits history; a filter deliberately omits selected objects. Both can be sensible for other goals, but they change what is available locally. - Let the transfer finish and check its exit status. If the command reports an error or is interrupted, do not assume the destination is a complete mirror. Review the error, confirm the destination and source, and retry or repair the transfer before relying on the copy.
- Handle LFS if the repository uses it. Git refs and Git LFS payloads are separate. For a GitHub repository duplication workflow that needs LFS content, GitHub documents adding
git lfs fetch --alland, when pushing a duplicate,git lfs push --all. Follow the GitHub duplication instructions for the exact source and destination workflow; a refs mirror alone does not establish that every LFS payload is present.
For a local filesystem source rather than a network URL, be cautious if the source may be changing while the clone runs. Git’s clone documentation warns that local cloning can race with modifications. It also warns that a shared clone can borrow objects from its source and later become corrupt if those borrowed objects are removed. For a local backup where that dependency is not intended, avoid shared-clone behavior; Git documents --no-hardlinks as a way to force copying rather than hard-linking local objects.
How can I inspect a bare mirror without changing it?
Use read-only Git commands with the mirror’s Git directory. These examples inspect refs, recent history, object storage, and object connectivity without pushing changes to another repository.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
git --git-dir=destination.git show-ref
git --git-dir=destination.git log --all --oneline --decorate -n 30
git --git-dir=destination.git count-objects -vH
git --git-dir=destination.git fsck --full
show-reflists refs recorded in the mirror. It can help confirm that the repository has refs to inspect, but by itself it does not prove that the source’s complete ref set was copied.log --allshows recent commits reachable from refs. The-n 30limit is only a display limit; it does not truncate the repository’s history.count-objects -vHreports local object-storage details in human-readable units. Read it as one view of storage, not a complete account of checkout expansion or repository complexity.fsck --fullchecks object connectivity and validity. The Git fsck documentation explains the check. A successful check is useful evidence about local object integrity, but it is not a comparison against the source.
Do not use git push --mirror as an inspection command. It updates refs at a destination and can overwrite or delete refs there to make them match the mirror. GitHub includes it in its repository duplication workflow, where it has a deliberate destination-writing role—not as a read-only diagnostic.
Also avoid running scripts, hooks, or build steps from an untrusted repository just to inspect it. Start with Git’s read-only metadata commands. If you need to examine files, make a separate working copy and treat the repository contents as untrusted input.
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCrashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteHow do I check whether the clone is complete and healthy?
Use several checks because no single command answers every question. Ref inspection tells you what refs exist locally; fsck checks local object connectivity and validity; and a source-to-copy comparison, when you have a trusted way to make one, addresses whether the copy has the refs you expected.
- Check that refs are present. Run
show-refand review the output against the kinds of refs you expected to preserve. A mirror maps all refs fetched from its source, but a local list cannot reveal a ref that was absent from the source response or never fetched. - Check repository integrity. Run
git --git-dir=destination.git fsck --fulland read its output rather than treating any output as an automatic failure or success. Git’s documentation describes the command’s checks and reported conditions. - Interpret partial-clone results differently. If you intentionally used a filter, some objects may be promised for later retrieval rather than stored locally. The Git partial-clone documentation explains that missing objects can be fetched later from the promisor remote. Do not mistake an intentionally incomplete local object set for a full offline archive; investigate reported missing objects in the context of the clone’s filter and promisor configuration.
- Account for non-Git data. If the repository uses LFS, verify that the required LFS payloads were fetched as well as the refs. Git’s object checks do not establish that separate LFS content has been copied.
- Keep the destination unchanged during inspection. Avoid fetches, pushes, ref updates, and commands that write to a remote when the task is only to inspect the copy. If a later update is needed, treat it as a separate maintenance action.
There is an important difference between “the objects I have are internally consistent” and “I have every object and ref that the source has.” fsck addresses the first question. Ref and source comparisons, plus separate LFS checks where relevant, are needed for the second.
Also popular on Amazon
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
How can I understand the real size of a large repository?
Repository size is multidimensional. Compressed pack size, total uncompressed object size, number of objects and refs, history depth, tree structure, and the expanded checkout can tell different stories. A repository with a manageable compressed object database may still expand substantially when checked out, while a high ref or tree count can add complexity that a single disk-size figure hides.
The git-sizer project analyzes reachable objects and checkout characteristics, helping surface factors such as large blobs, many refs, large trees, long histories, and checkout expansion. Run it against the repository you want to understand, following the project’s installation and usage instructions. Treat its concern levels as project heuristics, not universal safety thresholds, hosting-service limits, or a guarantee that a particular machine can safely handle the repository.
For planning, ask four separate questions:
- Ref coverage: Do you need every ref or only selected branches and tags?
- Object completeness: Must all Git objects be available locally now, or can omitted objects be fetched later?
- Checkout size: Do you need all files on disk, or only selected directories?
- Offline availability: Must the copy remain useful without access to the source or another remote?
These axes explain why “clone a large Git repo without downloading everything” and “make a complete local mirror” are different tasks. A full mirror prioritizes local ref and object coverage. Filters and shallow history reduce what is initially transferred, while sparse checkout limits which files are placed in a working tree. None of those smaller-copy choices should be described as a complete offline archive unless the omitted data has also been obtained.
Should I use a filtered clone, shallow clone, or sparse checkout?
Choose based on which dimension you can compromise: object contents, history, or checked-out paths. These options solve different problems and should not be treated as interchangeable.
Also popular on Amazon
- Portable and powerful USB-C HUB: BENFEI USB Type-C HUB, with super-soft and knot-free silicone woven design cable, meets most mobile office needs. Compact, lightweight, stylish, and powerful portable USB C Hub equipped with 1 x HDMI port, 1 x 100W charging, and 3 x USB ports. 18-month warranty, 24-hour response, to ensure you feel at ease when using our product.
- Design centered on comfort and reliability: Thanks to BENFEI's end-to-end in-house cable production capability, in-house PCBA and assembly capability, using the industry's most advanced silicone woven design and process, 20cm cable in length, no knots, super-soft, the HUB is easy to use in all scenarios: laptop, tablet, stand etc. Super-soft, 25000+ life cycles, to meet your daily carrying and office needs.
- 100W Charging: Support up to 90W USB C pass-through charging via Type-C port to keep your laptop powered. 10W is reserved for other interface operations. No data and video function on the Type-C port.
- 4K HDMI Display: The HDMI port supports media display at resolutions up to 4K 30Hz, keeping every incredible moment detailed and ultra vivid. Please note that the C port of the Host device needs to support video output.
- Transfer Files in Seconds: Transfer files and from your laptop at speeds up to 10 Gbps with USB A 3.2 port. Extra 2 USB A 2.0 ports are perfectly for your keyboards and mouse.
| Approach | Useful when | What you give up or change |
|---|---|---|
Unfiltered git clone --mirror |
You need a local mirror of refs and full Git object contents for preservation or analysis. | It requires storage for the fetched repository and has no working tree. |
Filtered partial clone, such as --filter=blob:none |
You want to reduce initial transfer or local object storage. | Some objects are omitted until needed and may require a connection to the promisor remote. It is not a self-contained full-object copy. |
Shallow clone with --depth |
A disposable build or CI job needs only limited recent history. | Older history is intentionally absent. |
| Sparse checkout | You want a working tree containing only selected paths. | It narrows visible checkout paths; by itself it does not mean all refs or object contents are locally present, nor does it make a full mirror. |
Git’s partial-clone documentation calls partial clone a performance optimization that lets Git function without a complete copy of the repository. That can be a good trade for day-to-day work on a subset of a project. The same property is exactly why a filtered clone is the wrong choice when the requirement is a complete offline copy.
Sparse checkout is about the working tree, not a guarantee about archive completeness. If your actual goal is to inspect a few project directories, use an appropriate working clone and sparse-checkout workflow rather than expecting a bare mirror to display files. Keep the two tasks separate: preserve repository data in the mirror; browse or edit files in a worktree or separate clone.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
How do I transfer a mirror offline?
A Git bundle can package repository objects and refs into a file for transfer without a live network connection. The Git bundle manual documents bundle creation and verification.
Before creating one, determine which refs and history the recipient needs. A bundle only helps if it includes the required revisions and any necessary history; do not assume that transferring a file automatically makes it a complete backup. Validate the bundle after transfer using the commands and workflow in the Git bundle documentation, and verify that the recipient can access the refs and history needed for the task.
Also popular on Amazon
- 【Read before You Buy】 Note: This adapter is USB 2.0 version and cannot transmit HDM, VGA, or other video signals. Nevertheless, they are fully capable of charging devices,duplicating files, and can be seamlessly integrated with USB-C earphones, wireless network adapters, and SD card adapters.
- 【Easy to Use and Safe】Thanks to modern manufacturing techniques, we've made these adapters sufficiently compact so that they can remain inserted in your device without noticeable protrusion or inconvenience. This means you don't have to constantly plug and unplug them, reducing the likelihood of wear and misalignment, and making them more convenient to carry around.
- 【Reliable Quality】Engineered for enhanced durability, durable aluminum alloy shell material,get excellent wear resistance and heat dissipation,the male USB C and female USB connectors & the male USB and female USB C connectors are designed to be plugged and unplugged up to 20000 times. Provides data transfer, device charging, memory space expansion, and additional computer peripherals.
- 【Think more for you】Do you need to connect a USB-C-enabled device to an odd device that only has USB-A ports? Then these USB-A male to USB-C female adapters are made for you.Simply insert the adapter into the USB-A port on the device, and you can instantly connect your USB-C device to the device that originally didn't have the correct connection port.
- 【Trusted xiwxi Quality and Service】As a responsible brand seller, you will receive xiwxi's 12-month Quality assurance and lifetime friendly customer service, you're not just buying a product,you're investing in peace of mind with all-round quality and exceptional customer service.
Bundles contain Git repository data, not a guarantee that separately stored LFS payloads are included. If LFS content is part of the transfer requirement, arrange and validate that content separately.
What common mistakes make a mirror less useful?
- Using a depth limit for an archive. A shallow clone intentionally omits older history. Use it for a limited-history task, not when the requirement is a full historical copy.
- Using a filter without accounting for missing objects. Filtered clones can fetch promised content later, which means access to the promisor remote may be needed. They are not equivalent to a complete offline archive.
- Expecting files in a bare mirror. A mirror has no working tree. Use a separate working clone or worktree when you need ordinary file browsing or editing.
- Assuming refs include LFS payloads. LFS objects are a separate concern. Follow the applicable LFS fetch and push procedure when duplicating a repository that uses LFS.
- Treating
fsckas a source comparison. It checks local object integrity and connectivity; it does not establish that the source had no additional refs or data. - Using a borrowed local clone as an independent backup. Shared clones may depend on source objects that can later be removed. For a backup, avoid unintended object alternates or sharing dependencies.
- Running a mirror push while intending only to inspect.
git push --mirrorwrites refs to a destination and can overwrite or delete its refs. Keep it out of a read-only inspection workflow.
Frequently Asked Questions
Does git fsck prove my mirror is identical to the source?
No. It checks the local repository’s object connectivity and validity, not whether the source had additional refs or separately stored content. To assess source equivalence, compare the expected refs with a trusted source listing and account for LFS payloads separately.
Free tools Windows power users keep installed
One-click scans. No signup required.
Can I delete the original repository after making a mirror?
Do not rely on a mirror as the only copy until you have verified the transfer, established that it contains the refs and data you need, and checked any LFS content separately. For important backups, preserve another independent copy; a mirror does not protect against loss of the device holding it.
Can I update a mirror after the initial clone?
Yes, mirrors are commonly maintained by fetching updates from their configured source, but a fetch can update mirrored refs. Before updating a preservation copy, consider keeping a separate snapshot if you need to retain the exact earlier state.
Will a Git bundle include unreachable objects?
Do not assume so. Plan bundles around the refs and history the recipient needs, and consult the Git bundle documentation for the revisions and prerequisites included by your chosen command.




