Table of Contents

Interface IGitBashBuilderPS

Namespace
SunamoPS._public.SunamoInterfaces.Interfaces
Assembly
SunamoPS.dll

Interface for building Git bash commands.

public interface IGitBashBuilderPS
Extension Methods

Properties

Commands

Gets the list of accumulated commands.

List<string> Commands { get; }

Property Value

List<string>

Methods

Add(string)

Adds a raw git command.

void Add(string command)

Parameters

command string

Git command to add.

AddNewRemote(string)

Adds a new remote to the repository.

void AddNewRemote(string remoteName)

Parameters

remoteName string

Name of the remote to add.

Append(string)

Appends text to the current command.

void Append(string text)

Parameters

text string

Text to append.

AppendLine()

Appends an empty line.

void AppendLine()

AppendLine(string)

Appends a line of text.

void AppendLine(string text)

Parameters

text string

Text to append as a line.

Cd(string)

Changes the current directory.

void Cd(string path)

Parameters

path string

Target directory path.

Checkout(string)

Performs a git checkout to the specified branch or commit.

void Checkout(string argument)

Parameters

argument string

Branch, tag, or commit to checkout.

Clean(string)

Performs a git clean with the specified options.

void Clean(string options)

Parameters

options string

Git clean options.

Clear()

Clears all accumulated commands.

void Clear()

Clone(string, string)

Clones a git repository.

void Clone(string repoUri, string arguments)

Parameters

repoUri string

Repository URI to clone.

arguments string

Additional clone arguments.

Commit(bool, string)

Creates a git commit.

void Commit(bool isAddingAllUntrackedFiles, string commitMessage)

Parameters

isAddingAllUntrackedFiles bool

Whether to add all untracked files before committing.

commitMessage string

Commit message text.

Config(string)

Applies a git config command.

void Config(string configValue)

Parameters

configValue string

Config setting to apply.

Fetch(string)

Fetches from remote repository.

void Fetch(string remoteName = "")

Parameters

remoteName string

Remote name to fetch from.

Init()

Initializes a new git repository.

void Init()

Merge(string)

Merges the specified branch.

void Merge(string branchName)

Parameters

branchName string

Branch to merge.

Pull()

Pulls from remote repository.

void Pull()

Push(bool)

Pushes to remote repository.

void Push(bool isForce)

Parameters

isForce bool

Whether to force push.

Push(string)

Pushes with custom arguments.

void Push(string argument)

Parameters

argument string

Push arguments.

Remote(string)

Manages remote repositories.

void Remote(string argument)

Parameters

argument string

Remote command arguments.

Status()

Runs git status.

void Status()

ToString()

Returns all accumulated commands as a string.

string ToString()

Returns

string

String representation of commands.