Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8741385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:18:14+00:00 2026-06-13T11:18:14+00:00

Git assumes -l when a clone is requested from a local file system, presumably

  • 0

Git assumes -l when a clone is requested from a local file system, presumably to speed up the clone and save disk space. What are the implications of this type of clone? If I clone a repository twice and then make a commit to one, then will the changes be visible in the other clone? I’m wondering if Git is careful to copy on writes. If the original repository is read only, then will that present problems for the clones?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T11:18:15+00:00Added an answer on June 13, 2026 at 11:18 am

    The git clone manpage states about -l:

    When the repository to clone from is on a local machine, this flag bypasses the normal “git aware” transport mechanism and clones the repository by making a copy of HEAD and everything under objects and refs directories. The files under .git/objects/ directory are hardlinked to save space when possible.

    This means that you will get a hardlink for all Git objects which has no real implications because those objects are immutable anyway and Git does not update them once they are created. You also get actual copies of HEAD and other symbolic references, so changes to them in one repository will not be seen in others. If you commit a change, a few new objects will be created under .git/objects and the HEAD reference will be updated to point to the latest commit (which will be one of the newly created objects); no existing objects will be updated, so you don’t have to worry about the hardlinks.

    The manpage states one implication, which may be of interest:

    To force copying instead of hardlinking (which may be desirable if you are trying to make a back-up of your repository), but still avoid the usual “git aware” transport mechanism, –no-hardlinks can be used.

    The downside of hardlinks is that they refer to the same actual inodes on disk, so if one Git object gets corrupted, all your local clones that hardlink to it will have a corrupted object. Without hardlinks, you will have actual backup copies of all of your objects.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I feel like I tried everything to clone http://thechaw.com/source from git with no success.
Possibly related to Git - pulling changes from clone back onto the master I
I set up git and gitolite with some help from members on this forum
Assume you have a file which has been committed in your Git repo. You
git clone supports both HTTPS and SSH remote URLs. Which should I use? What
git status tells me that my branch and the one I started from on
Assume that somewhere in the web exists public git repository. I want to clone
I'm trying to convert an existing SVN repository to GIT using git-svn clone but
I'm trying to use git to clone an svn repository with std layout (using
I am upgrading my app from Rails 3.0 to Rails 3.1. To do this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.