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
Methods
Add(string)
Adds a raw git command.
void Add(string command)
Parameters
commandstringGit command to add.
AddNewRemote(string)
Adds a new remote to the repository.
void AddNewRemote(string remoteName)
Parameters
remoteNamestringName of the remote to add.
Append(string)
Appends text to the current command.
void Append(string text)
Parameters
textstringText to append.
AppendLine()
Appends an empty line.
void AppendLine()
AppendLine(string)
Appends a line of text.
void AppendLine(string text)
Parameters
textstringText to append as a line.
Cd(string)
Changes the current directory.
void Cd(string path)
Parameters
pathstringTarget directory path.
Checkout(string)
Performs a git checkout to the specified branch or commit.
void Checkout(string argument)
Parameters
argumentstringBranch, tag, or commit to checkout.
Clean(string)
Performs a git clean with the specified options.
void Clean(string options)
Parameters
optionsstringGit clean options.
Clear()
Clears all accumulated commands.
void Clear()
Clone(string, string)
Clones a git repository.
void Clone(string repoUri, string arguments)
Parameters
Commit(bool, string)
Creates a git commit.
void Commit(bool isAddingAllUntrackedFiles, string commitMessage)
Parameters
isAddingAllUntrackedFilesboolWhether to add all untracked files before committing.
commitMessagestringCommit message text.
Config(string)
Applies a git config command.
void Config(string configValue)
Parameters
configValuestringConfig setting to apply.
Fetch(string)
Fetches from remote repository.
void Fetch(string remoteName = "")
Parameters
remoteNamestringRemote name to fetch from.
Init()
Initializes a new git repository.
void Init()
Merge(string)
Merges the specified branch.
void Merge(string branchName)
Parameters
branchNamestringBranch to merge.
Pull()
Pulls from remote repository.
void Pull()
Push(bool)
Pushes to remote repository.
void Push(bool isForce)
Parameters
isForceboolWhether to force push.
Push(string)
Pushes with custom arguments.
void Push(string argument)
Parameters
argumentstringPush arguments.
Remote(string)
Manages remote repositories.
void Remote(string argument)
Parameters
argumentstringRemote command arguments.
Status()
Runs git status.
void Status()
ToString()
Returns all accumulated commands as a string.
string ToString()
Returns
- string
String representation of commands.