Namespaces

Types in GitSharp.Commands

Type CloneCommand

Namespace GitSharp.Commands

Parent AbstractFetchCommand

Represents git's clone command line interface command.

Properties

Public properties

string ActualDirectory get;

Get the directory where the Init command will initialize the repository. if GitDirectory is null ActualDirectory is used to initialize the repository.

bool Bare get; set;

Make a bare GIT repository. That is, instead of creating "directory" and placing the administrative files in "directory"/.git, make the "directory" itself the $GIT_DIR. This obviously implies the -n because there is nowhere to check out the working tree. Also the branch heads at the remote are copied directly to corresponding local branch heads, without mapping them to refs/remotes/origin/. When this option is used, neither remote-tracking branches nor the related configuration variables are created.

int Depth get; set;

Not implemented. Create a shallow clone with a history truncated to the specified number of revisions. A shallow repository has a number of limitations (you cannot clone or fetch from it, nor push from nor into it), but is adequate if you are only interested in the recent history of a large project with a long history, and would want to send in fixes as patches.

string GitDirectory get; set;

bool Local get; set;

Not implemented When the repository to clone from is on a local machine, this flag bypasses 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 is now the default when the source repository is specified with /path/to/repo syntax, so it essentially is a no-op option. 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.

bool Mirror get; set;

Set up a mirror of the remote repository. This implies --bare.

bool NoCheckout get; set;

No checkout of HEAD is performed after the clone is complete.

string OriginName get; set;

Instead of using the remote name origin to keep track of the upstream repository, use "name".

StreamWriter OutputStream get; set;

bool Quiet get; set;

Operate quietly. This flag is also passed to the `rsync' command when given.

string ReferenceRepository get; set;

Not implemented If the reference repository is on the local machine automatically setup .git/objects/info/alternates to obtain objects from the reference repository. Using an already existing repository as an alternate will require fewer objects to be copied from the repository being cloned, reducing network and local storage costs. NOTE: see NOTE to --shared option.

Repository Repository get; set;

bool Shared get; set;

Not implemented When the repository to clone is on the local machine, instead of using hard links, automatically setup .git/objects/info/alternates to share the objects with the source repository. The resulting repository starts out without any object of its own. NOTE: this is a possibly dangerous operation; do not use it unless you understand what it does. 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). These objects may be removed by normal git operations (such as git-commit) which automatically call git gc --auto. (See git-gc(1).) If these objects are removed and were referenced by the cloned repository, then the cloned repository will become corrupt.

string Source get; set;

The (possibly remote) repository to clone from.

string TemplateDirectory get; set;

Not implemented. Specify the directory from which templates will be used; if unset the templates are taken from the installation defined default, typically /usr/share/git-core/templates.

string UploadPack get; set;

Not implemented. 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.

bool Verbose get; set;

Display the progressbar, even in case the standard output is not a terminal.