![]() Specify the directory from which templates will be used (See the "TEMPLATE DIRECTORY" section of git-init(1).)Ĭreate a shallow clone with a history truncated to the specified number of revisions. When given, and the repository to clone from is accessed via ssh, this specifies a non-default path for the command run on the other end. Repository, this is the branch that will be checked out. Instead of pointing the newly created HEAD to the branch pointed to by the cloned repository's HEAD, point to branch instead. Instead of using the remote name origin to keep track of the upstream repository, use. Set up a mirror of the remote repository. When this option is used, neither remote-trackingīranches nor the related configuration variables are created. Remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/. This obviously implies the -n because there is nowhere to check out the working tree. That is, instead of creating and placing the administrative files in /.git, make the ![]() No checkout of HEAD is performed after the clone is complete. Status even if the standard error stream is not directed to a terminal. ![]() Progress status is reported on the standard error stream by default when it is attached to a terminal, unless -q is specified. Does not affect the reporting of progress status to the standard error stream. This flag is also passed to the 'rsync' command when given. Progress is not reported to the standard error stream. NOTE: see the NOTE for the -shared option. UsingĪn already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage git/objects/info/alternates to obtain objects from the reference repository. If the reference repository is on the local machine, automatically setup. Source repository into a pack in the cloned repository. If you want to break the dependency of a repository cloned with -s on its source repository, you can simply run git repack -a to copy all objects from the It is safe, however, to run git gc, which uses the -l option by default. Repository, removing the disk space savings of clone -s. Note that running git repack without the -l option in a repository cloned with -s will copy objects from the source repository into a pack in the cloned Git-gc(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 gc -auto. If you clone your repository using this optionĪnd then delete branches (or use any other git command that makes any existing commit unreferenced) in the source repository, some objects may become 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 When the repository to clone is on the local machine, instead of using hard links, automatically setup. Optimize the cloning process from a repository on a local filesystem by copying files under. (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 The default when the source repository is specified with /path/to/repo syntax, so it essentially is a no-op option. 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Ĭopy 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 The remote master branch into the current master branch, if any. Clones a repository into a newly created directory, creates remote-tracking branches for each branch in the cloned repository (visible using git branch -r),Īnd 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
0 Comments
Leave a Reply. |