C# Class GitSharp.Repository

Represents a git repository
Inheritance: IDisposable
Exibir arquivo Open project: stschake/GitSharp Class Usage Examples

Public Methods

Method Description
CheckoutBranch ( Branch branch ) : void

Check out the given branch

CheckoutBranch ( string name ) : void

Check out the branch with the given name

Close ( ) : void
Commit ( string message ) : Commit

Commit staged changes and update HEAD. The default git author is used.

Commit ( string message, Author author ) : Commit

Commit staged changes and update HEAD

Dispose ( ) : void
Init ( InitCommand cmd ) : Repository

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

Init ( string path ) : Repository

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

Init ( string path, bool bare ) : Repository

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

IsValid ( string path ) : bool

Checks if the directory given by the path is a valid non-bare git repository. The given path may either point to the working directory or the repository's .git directory.

IsValid ( string path, bool bare ) : bool

Checks if the directory given by the path is a valid git repository.

Repository ( string path ) : System

Initializes the Repository object.

ToString ( ) : string

Private Methods

Method Description
DirExists ( string path ) : bool
FileExists ( string path ) : bool
Repository ( GitSharp.Core.Repository repo ) : System

Method Details

CheckoutBranch() public method

Check out the given branch
public CheckoutBranch ( Branch branch ) : void
branch Branch
return void

CheckoutBranch() public method

Check out the branch with the given name
public CheckoutBranch ( string name ) : void
name string
return void

Close() public method

public Close ( ) : void
return void

Commit() public method

Commit staged changes and update HEAD. The default git author is used.
public Commit ( string message ) : Commit
message string The commit message
return Commit

Commit() public method

Commit staged changes and update HEAD
public Commit ( string message, Author author ) : Commit
message string The commit message
author Author The author of the content to be committed
return Commit

Dispose() public method

public Dispose ( ) : void
return void

Init() public static method

Initializes a repository in the current location using the provided git command's options.
public static Init ( InitCommand cmd ) : Repository
cmd InitCommand
return Repository

Init() public static method

Initializes a non-bare repository. Use GitDirectory to specify location.
public static Init ( string path ) : Repository
path string
return Repository

Init() public static method

Initializes a repository. Use GitDirectory to specify the location. Default is the current directory.
public static Init ( string path, bool bare ) : Repository
path string
bare bool
return Repository

IsValid() public static method

Checks if the directory given by the path is a valid non-bare git repository. The given path may either point to the working directory or the repository's .git directory.
public static IsValid ( string path ) : bool
path string
return bool

IsValid() public static method

Checks if the directory given by the path is a valid git repository.
public static IsValid ( string path, bool bare ) : bool
path string
bare bool
return bool

Repository() public method

Initializes the Repository object.
public Repository ( string path ) : System
path string Path to the local git repository.
return System

ToString() public method

public ToString ( ) : string
return string