Table of Contents

Interface IGitBashBuilder

Namespace
SunamoInterfaces.Interfaces
Assembly
SunamoInterfaces.dll

Interface for building Git bash command sequences.

public interface IGitBashBuilder
Extension Methods

Properties

Commands

Gets the list of Git commands that have been built.

List<string> Commands { get; }

Property Value

List<string>

Methods

Add(string)

Adds files matching the specified pattern to the staging area.

void Add(string filePattern)

Parameters

filePattern string

The file pattern to add.

AddNewRemote(string)

Adds a new remote repository.

void AddNewRemote(string remoteName)

Parameters

remoteName string

The name of the remote to add.

Append(string)

Appends text to the current command.

void Append(string text)

Parameters

text string

The text to append.

AppendLine()

Appends a new line to the command sequence.

void AppendLine()

AppendLine(string)

Appends text followed by a new line.

void AppendLine(string text)

Parameters

text string

The text to append.

Cd(string)

Changes the current directory.

void Cd(string directory)

Parameters

directory string

The directory to change to.

Checkout(string)

Checks out the specified branch.

void Checkout(string branchName)

Parameters

branchName string

The name of the branch to checkout.

Clean(string)

Cleans the working directory with the specified options.

void Clean(string options)

Parameters

options string

The clean command options.

Clear()

Clears all accumulated commands.

void Clear()

Clone(string, string)

Clones a repository from the specified URI.

void Clone(string repoUri, string args)

Parameters

repoUri string

The repository URI to clone from.

args string

Additional arguments for the clone command.

Commit(bool, string)

Creates a commit with the specified message.

void Commit(bool isAddingAllUntrackedFiles, string commitMessage)

Parameters

isAddingAllUntrackedFiles bool

Whether to add all untracked files before committing.

commitMessage string

The commit message.

Config(string)

Sets a Git configuration value.

void Config(string configValue)

Parameters

configValue string

The configuration value to set.

Fetch(string)

Fetches from the specified remote.

void Fetch(string remoteName = "")

Parameters

remoteName string

The name of the remote to fetch from. Defaults to empty string.

Init()

Initializes a new Git repository.

void Init()

Merge(string)

Merges the specified branch into the current branch.

void Merge(string branchName)

Parameters

branchName string

The name of the branch to merge.

Pull()

Pulls changes from the remote repository.

void Pull()

Push(bool)

Pushes changes to the remote repository.

void Push(bool isForcing)

Parameters

isForcing bool

Whether to force push.

Push(string)

Pushes changes to the specified remote branch.

void Push(string remoteBranch)

Parameters

remoteBranch string

The remote branch to push to.

Remote(string)

Executes a remote command with the specified arguments.

void Remote(string arguments)

Parameters

arguments string

The arguments for the remote command.

Status()

Shows the working tree status.

void Status()

ToString()

Converts the command sequence to a string representation.

string ToString()

Returns

string

The string representation of all commands.