    }
  
    /// Gets the release date of the latest available Flutter version.
-@@ -730,7 +730,7 @@ class GitTagVersion {
- 
-   static GitTagVersion determine(ProcessUtils processUtils, {String? workingDirectory, bool fetchTags = false, String gitRef = 'HEAD'}) {
+@@ -708,7 +708,7 @@ class GitTagVersion {
+     String gitRef = 'HEAD'
+   }) {
      if (fetchTags) {
 -      final String channel = _runGit('git rev-parse --abbrev-ref HEAD', processUtils, workingDirectory);
 +      final String channel = _runGit('git --git-dir .git rev-parse --abbrev-ref HEAD', processUtils, workingDirectory);
        if (channel == 'dev' || channel == 'beta' || channel == 'stable') {
          globals.printTrace('Skipping request to fetchTags - on well known channel $channel.');
        } else {
-@@ -739,7 +739,7 @@ class GitTagVersion {
+@@ -718,7 +718,7 @@ class GitTagVersion {
      }
      // find all tags attached to the given [gitRef]
      final List<String> tags = _runGit(

       if (parseResult.exitCode == 0) {
         buffer.writeln('Channel "${getNameForChannel(channel)}" was previously on: ${parseResult.stdout}.');
diff --git a/packages/flutter_tools/lib/src/version.dart b/packages/flutter_tools/lib/src/version.dart
index f2068a6ca2..99b161689e 100644
--- a/packages/flutter_tools/lib/src/version.dart
+++ b/packages/flutter_tools/lib/src/version.dart
@@ -106,7 +106,7 @@ class FlutterVersion {
     String? channel = _channel;
     if (channel == null) {
       final String gitChannel = _runGit(
-        'git rev-parse --abbrev-ref --symbolic @{u}',
+        'git --git-dir .git rev-parse --abbrev-ref --symbolic @{u}',
         globals.processUtils,
         _workingDirectory,
       );
@@ -114,7 +114,7 @@ class FlutterVersion {
       if (slash != -1) {
         final String remote = gitChannel.substring(0, slash);
         _repositoryUrl = _runGit(

 
     // Check first for a stable tag
     final RegExp stableTagPattern = RegExp(r'^\d+\.\d+\.\d+$');
@@ -739,7 +739,7 @@ class GitTagVersion {
     // recent tag and number of commits past.
     return parse(
       _runGit(
