![]() (See git-maintenance(1).) If these objects are removed and were referenced by the cloned repository, then the cloned repository will become corrupt. These objects may be removed by normal Git operations (such as git commit) which automatically call git maintenance run -auto. If you clone your repository using this option and then delete branches (or use any other Git command that makes any existing commit unreferenced) in the source repository, some objects may become unreferenced (or dangling). NOTE: this is a possibly dangerous operation do not use it unless you understand what it does. The resulting repository starts out without any object of its own. git/objects/info/alternates to share the objects with the source repository. When the repository to clone is on the local machine, instead of using hard links, automatically setup. This may be desirable if you are trying to make a back-up of your repository. git/objects directory instead of using hardlinks. no-hardlinksįorce the cloning process from a repository on a local filesystem to copy the files under the. NOTE: this operation can race with concurrent modification to the source repository, similar to running cp -r src dst while modifying src. This is a security measure to prevent the unintentional copying of files by dereferencing the symbolic links. If the repository’s $GIT_DIR/objects has symbolic links or is a symbolic link, the clone will fail. Specifying -no-local will override the default when /path/to/repo is given, using the regular Git transport instead. If the repository is specified as a URL, then this flag is ignored (and we never use the local optimizations). If the repository is specified as a local path (e.g., /path/to/repo), this is the default, and -local is essentially a no-op. git/objects/ directory are hardlinked to save space when possible. 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. This default configuration is achieved by creating references to the remote branch heads under refs/remotes/origin and by initializing and configuration variables. ] Ĭlones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch -remotes), and creates and checks out an initial branch that is forked from the cloned repository’s currently active branch.Īfter the clone, a plain git fetch without arguments will update all the remote-tracking branches, and a git pull without arguments will in addition merge the remote master branch into the current master branch, if any (this is untrue when "-single-branch" is given see below).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |