Namespaces

Types in GitSharp

Type Git

Namespace GitSharp

The static class Git provides everything to interact with git itself, such as the command line interface commands, the git configuration or properties that are affecting git globally.

Methods

Properties

Public static methods

Repository Clone(CloneCommand command)

Repository Clone(string fromUrl, string toPath, bool bare)

Clone a repository and checkout the working directory only if bare == false

Repository Clone(string fromUrl, string toPath)

Clone a repository and checkout the working directory.

void Init(InitCommand command)

Initializes a repository in the current location using the provided git command's options.

void Init(string path, bool bare)

Initializes a repository. Use GitDirectory to specify the location. Default is the current directory.

void Init(string path)

Initializes a non-bare repository. Use GitDirectory to specify location.
Return
void

The initialized repository

StatusResults Status(StatusCommand command)

Public properties

string DefaultGitDirectory get; set;

Get or set the default git directory for all commands. A command can override this, however, by setting its own GitDirectory property.

StreamWriter DefaultOutputStream get; set;

Get or set the default output stream that all git commands are writing to. Per default this returns a StreamWriter wrapping the standard output stream. By setting your own Streamwriter one can capture the output of the commands.

Repository DefaultRepository get; set;

Get or set the default git repository for all commands. A command can override this by setting it's own Repository property. Note: Init and Clone do not respect Repository since they create a Repository as a result of Execute.

string Version get;

Returns the version of GitSharp.