C# Class 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.
Inheritance: Ref
Afficher le fichier Open project: stschake/GitSharp Class Usage Examples

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
Branch ( Repository repo, GitSharp.Core.Ref @ref ) : System
GetSafeCurrentCommit ( ) : Commit
ResetHard ( Commit commit ) : void
ResetSoft ( Commit commit ) : void
ResolveCommit ( string commitHash ) : Commit

Method Details

Branch() public méthode

public Branch ( Ref @ref ) : System
@ref Ref
Résultat System

Branch() public méthode

public Branch ( Repository repo, string name ) : System
repo Repository
name string
Résultat System

Checkout() public méthode

Switch to this branch and check it out into the working directory.
public Checkout ( ) : void
Résultat void

Create() public static méthode

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")
Résultat Branch

Create() public static méthode

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.
Résultat Branch

Delete() public méthode

Delete this branch
public Delete ( ) : void
Résultat void

Merge() public méthode

public Merge ( Branch other ) : void
other Branch
Résultat void

Rename() public méthode

public Rename ( string name ) : void
name string
Résultat void

Reset() public méthode

public Reset ( ) : void
Résultat void

Reset() public méthode

public Reset ( Commit commit ) : void
commit Commit
Résultat void

Reset() public méthode

public Reset ( Commit commit, ResetBehavior resetBehavior ) : void
commit Commit
resetBehavior ResetBehavior
Résultat void

Reset() public méthode

public Reset ( ResetBehavior resetBehavior ) : void
resetBehavior ResetBehavior
Résultat void

Reset() public méthode

public Reset ( string commitHash ) : void
commitHash string
Résultat void

Reset() public méthode

public Reset ( string commitHash, ResetBehavior resetBehavior ) : void
commitHash string
resetBehavior ResetBehavior
Résultat void

SwitchTo() public static méthode

Switch to the given branch
public static SwitchTo ( Branch branch ) : void
branch Branch
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string