C# Класс GitSharp.Repository

Represents a git repository
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
DirExists ( string path ) : bool
FileExists ( string path ) : bool
Repository ( GitSharp.Core.Repository repo ) : System

Описание методов

CheckoutBranch() публичный Метод

Check out the given branch
public CheckoutBranch ( Branch branch ) : void
branch Branch
Результат void

CheckoutBranch() публичный Метод

Check out the branch with the given name
public CheckoutBranch ( string name ) : void
name string
Результат void

Close() публичный Метод

public Close ( ) : void
Результат void

Commit() публичный Метод

Commit staged changes and update HEAD. The default git author is used.
public Commit ( string message ) : Commit
message string The commit message
Результат Commit

Commit() публичный Метод

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
Результат Commit

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

Init() публичный статический Метод

Initializes a repository in the current location using the provided git command's options.
public static Init ( InitCommand cmd ) : Repository
cmd InitCommand
Результат Repository

Init() публичный статический Метод

Initializes a non-bare repository. Use GitDirectory to specify location.
public static Init ( string path ) : Repository
path string
Результат Repository

Init() публичный статический Метод

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
Результат Repository

IsValid() публичный статический Метод

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
Результат bool

IsValid() публичный статический Метод

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
Результат bool

Repository() публичный Метод

Initializes the Repository object.
public Repository ( string path ) : System
path string Path to the local git repository.
Результат System

ToString() публичный Метод

public ToString ( ) : string
Результат string