GitClient class

Constructors

GitClient(String workingDirectory, [CliLogger? logger])

Properties

allBranches Future<List<Branch>>
Check a tag exists.
no setter
currentBranchName Future<String>
Returns the current branch name of the local git repository.
no setter
hashCode int
The hash code for this object.
no setterinherited
logger CliLogger
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
tagsForCurrentRevision Future<List<String>>
no setter
workingDirectory String
final

Methods

add(String filePattern) Future<void>
Stage files matching the specified file pattern for committing.
checkout({required String ref}) Future<void>
clone(String repository, {required String into}) Future<void>
commit(String message) Future<void>
Commit any staged changes with a specific git message.
createBranch(String branchName) Future<void>
Creates a new branch
currentRevision() String
executeCommand({required List<String> arguments, bool throwOnExitCodeError = true}) Future<ProcessResult>
Execute a git CLI command with arguments.
hasBranch(String branchName) Future<bool>
isBehindUpstream({String remote = 'origin', String? branch}) Future<bool>
Determine if the local git repository is behind on commits from it's remote branch.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
remotesList() Future<Map<String, String>>
Fetches updates for the default remote in the repository.
remoteUpdate() Future<void>
Fetches updates for the default remote in the repository.
tagCreate(String tag, String message, {String? commitId}) Future<bool>
Create a tag, if it does not already exist.
tagExists(String tag) Future<bool>
Check a tag exists.
tagFilterPattern(String packageName, TagReleaseType tagReleaseType, {String preid = 'dev', String prefix = 'v'}) String
Generate a filter pattern for a package name, useful for listing tags for a package.
tagForPackageVersion(String packageName, String packageVersion, {String prefix = 'v'}) String
Generate a git tag string for the specified package name and version.
tagsForRevision(String revision) Future<List<String>>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited