 diff --git a/dev/bots/prepare_package.dart b/dev/bots/prepare_package.dart
-index 468a91a954..5def6897ce 100644
+index 8e4cb81340..2c20940423 100644
 --- a/dev/bots/prepare_package.dart
 +++ b/dev/bots/prepare_package.dart
-@@ -525,7 +525,7 @@ class ArchiveCreator {
+@@ -526,7 +526,7 @@ class ArchiveCreator {
  
    Future<String> _runGit(List<String> args, {Directory? workingDirectory}) {
      return _processRunner.runProcess(

     );
   }
diff --git a/packages/flutter_tools/lib/src/commands/downgrade.dart b/packages/flutter_tools/lib/src/commands/downgrade.dart
index bb0eb428a9..4a2a48bb5e 100644
--- a/packages/flutter_tools/lib/src/commands/downgrade.dart
+++ b/packages/flutter_tools/lib/src/commands/downgrade.dart
@@ -118,7 +118,7 @@ class DowngradeCommand extends FlutterCommand {

   }
 
   /// Gets the release date of the latest available Flutter version.
@@ -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 {
@@ -718,7 +718,7 @@ class GitTagVersion {
     }
     // find all tags attached to the given [gitRef]
     final List<String> tags = _runGit(
