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
Methods
Add(string)
Adds files matching the specified pattern to the staging area.
void Add(string filePattern)
Parameters
filePatternstringThe file pattern to add.
AddNewRemote(string)
Adds a new remote repository.
void AddNewRemote(string remoteName)
Parameters
remoteNamestringThe name of the remote to add.
Append(string)
Appends text to the current command.
void Append(string text)
Parameters
textstringThe 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
textstringThe text to append.
Cd(string)
Changes the current directory.
void Cd(string directory)
Parameters
directorystringThe directory to change to.
Checkout(string)
Checks out the specified branch.
void Checkout(string branchName)
Parameters
branchNamestringThe name of the branch to checkout.
Clean(string)
Cleans the working directory with the specified options.
void Clean(string options)
Parameters
optionsstringThe 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
repoUristringThe repository URI to clone from.
argsstringAdditional arguments for the clone command.
Commit(bool, string)
Creates a commit with the specified message.
void Commit(bool isAddingAllUntrackedFiles, string commitMessage)
Parameters
isAddingAllUntrackedFilesboolWhether to add all untracked files before committing.
commitMessagestringThe commit message.
Config(string)
Sets a Git configuration value.
void Config(string configValue)
Parameters
configValuestringThe configuration value to set.
Fetch(string)
Fetches from the specified remote.
void Fetch(string remoteName = "")
Parameters
remoteNamestringThe 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
branchNamestringThe 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
isForcingboolWhether to force push.
Push(string)
Pushes changes to the specified remote branch.
void Push(string remoteBranch)
Parameters
remoteBranchstringThe remote branch to push to.
Remote(string)
Executes a remote command with the specified arguments.
void Remote(string arguments)
Parameters
argumentsstringThe 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.