C# Класс GitSharp.Branch

Represents a branch in git. You can create and manipulate git branches and you can manipulate your working directory using Branch. Note, that new Branch( ...) does not create a new branch in the repository but rather constructs the object to manipulate an existing branch. To create a new branch use the static Branch.Create API.
Наследование: Ref
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
Branch ( Ref @ref ) : System
Branch ( Repository repo, string name ) : System
Checkout ( ) : void

Switch to this branch and check it out into the working directory.

Create ( Repository repo, string name ) : Branch

Create a new branch from HEAD.

Create ( Repository repo, string name, Commit commit ) : Branch

Create a new branch from the given commit

Delete ( ) : void

Delete this branch

Merge ( Branch other ) : void
Rename ( string name ) : void
Reset ( ) : void
Reset ( Commit commit ) : void
Reset ( Commit commit, ResetBehavior resetBehavior ) : void
Reset ( ResetBehavior resetBehavior ) : void
Reset ( string commitHash ) : void
Reset ( string commitHash, ResetBehavior resetBehavior ) : void
SwitchTo ( Branch branch ) : void

Switch to the given branch

ToString ( ) : string

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

Метод Описание
Branch ( Repository repo, GitSharp.Core.Ref @ref ) : System
GetSafeCurrentCommit ( ) : Commit
ResetHard ( Commit commit ) : void
ResetSoft ( Commit commit ) : void
ResolveCommit ( string commitHash ) : Commit

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

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

public Branch ( Ref @ref ) : System
@ref Ref
Результат System

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

public Branch ( Repository repo, string name ) : System
repo Repository
name string
Результат System

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

Switch to this branch and check it out into the working directory.
public Checkout ( ) : void
Результат void

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

Create a new branch from HEAD.
public static Create ( Repository repo, string name ) : Branch
repo Repository
name string The name of the branch to create (i.e. "master", not "refs/heads/master")
Результат Branch

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

Create a new branch from the given commit
public static Create ( Repository repo, string name, Commit commit ) : Branch
repo Repository
name string The name of the branch to create (i.e. "master", not "refs/heads/master")
commit Commit The commit to base the branch on.
Результат Branch

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

Delete this branch
public Delete ( ) : void
Результат void

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

public Merge ( Branch other ) : void
other Branch
Результат void

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

public Rename ( string name ) : void
name string
Результат void

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

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

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

public Reset ( Commit commit ) : void
commit Commit
Результат void

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

public Reset ( Commit commit, ResetBehavior resetBehavior ) : void
commit Commit
resetBehavior ResetBehavior
Результат void

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

public Reset ( ResetBehavior resetBehavior ) : void
resetBehavior ResetBehavior
Результат void

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

public Reset ( string commitHash ) : void
commitHash string
Результат void

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

public Reset ( string commitHash, ResetBehavior resetBehavior ) : void
commitHash string
resetBehavior ResetBehavior
Результат void

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

Switch to the given branch
public static SwitchTo ( Branch branch ) : void
branch Branch
Результат void

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

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