GitUtils class
Utility functions for Git operations
Constructors
- GitUtils()
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
checkoutRef(
String ref, String? root) → Future< void> - Checks out a specific git ref Throws GitException if the operation fails
-
commitVersion(
String version, String? root, {bool? commitBadge, bool commitChangelog = true}) → Future< void> -
getCurrentBranch(
String? root) → Future< String?> - Gets the current Git branch name Returns null if in detached HEAD state or throws GitException if there's an error.
-
getCurrentRef(
String? root) → Future< String> - Gets the current HEAD ref
-
getCurrentWorkingDirectory(
) → String - Gets the current working directory path
-
getPreviousRef(
String? root) → Future< String> -
getRepositoryRoot(
String? root) → String - Gets the repository root directory
-
getTags(
String? root) → Future< List< String> > -
getVersions(
String? root) → Future< List< (String, Version)> > -
gitShow(
String ref, String? root, String path) → Future< String> -
gitTag(
String tag, String? root) → Future< void> -
gitTagExists(
String tag, String? root) → Future< bool> -
hasUncommittedChanges(
String? root) → bool - Checks if the current repository has uncommitted changes Throws GitException if Git is not available or if there's an error.
-
isGitRepository(
String? root) → Future< bool> - Checks if the current directory is a Git repository