diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md
index 3f7119f43..27c4f8f94 100644
--- a/recipes/README.recipes.md
+++ b/recipes/README.recipes.md
@@ -56,7 +56,7 @@ Recipe module to ensure a checkout is consistent on a bot.
 
 Wrapper for easy calling of bot_update.
 
-— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#498)(self, bot_update_step):**
+— **def [deapply\_patch](/recipes/recipe_modules/bot_update/api.py#500)(self, bot_update_step):**
 
 Deapplies a patch, taking care of DEPS and solution revisions properly.
     
@@ -87,7 +87,7 @@ Args:
   step_test_data: a null function that returns test bot_update.py output.
     Use test_api.output_json to generate test data.
 
-— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#475)(self, project_name, gclient_config=None):**
+— **def [get\_project\_revision\_properties](/recipes/recipe_modules/bot_update/api.py#477)(self, project_name, gclient_config=None):**
 
 Returns all property names used for storing the checked-out revision of
 a given project.
@@ -105,7 +105,7 @@ Returns (list of str): All properties that'll hold the checked-out revision
 
 &emsp; **@property**<br>&mdash; **def [last\_returned\_properties](/recipes/recipe_modules/bot_update/api.py#36)(self):**
 
-&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#425)(self, bot_update_json, name):**
+&mdash; **def [resolve\_fixed\_revision](/recipes/recipe_modules/bot_update/api.py#427)(self, bot_update_json, name):**
 
 Set a fixed revision for a single dependency using project revision
 properties.
diff --git a/recipes/recipe_modules/bot_update/api.py b/recipes/recipe_modules/bot_update/api.py
index b1f73851e..99f8c9553 100644
--- a/recipes/recipe_modules/bot_update/api.py
+++ b/recipes/recipe_modules/bot_update/api.py
@@ -190,6 +190,8 @@ class BotUpdateApi(recipe_api.RecipeApi):
       # e.g. they want to force refs/heads/master at the config level.
       main_repo_path = self._get_commit_repo_path(in_commit, cfg)
       revisions[main_repo_path] = revisions.get(main_repo_path) or in_commit_rev
+      if in_commit.id and in_commit.ref:
+        refs = [in_commit.ref] + refs
 
     # Guarantee that first solution has a revision.
     # TODO(machenbach): We should explicitly pass HEAD for ALL solutions
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic.json
index 89eab3c87..4faffbe17 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/basic.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic.json
@@ -16,6 +16,8 @@
       "/path/to/tmp/json",
       "--revision",
       "src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json
index 89eab3c87..4faffbe17 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic_luci.json
@@ -16,6 +16,8 @@
       "/path/to/tmp/json",
       "--revision",
       "src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json b/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json
index 479233710..d0b552c01 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/basic_with_branch_heads.json
@@ -16,6 +16,8 @@
       "/path/to/tmp/json",
       "--revision",
       "src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
+      "--refs",
+      "refs/heads/master",
       "--with_branch_heads",
       "--disable-syntax-validation"
     ],
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json
index 9330bd043..aec6ebe0c 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_HEAD.json
@@ -18,6 +18,8 @@
       "got_revision@src",
       "--revision",
       "src@HEAD",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json
index 8d50705ac..f9a6f3a86 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/no_cp_checkout_a_specific_commit.json
@@ -18,6 +18,8 @@
       "got_revision@src",
       "--revision",
       "src@aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json b/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json
index 89eab3c87..4faffbe17 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/resolve_chromium_fixed_version.json
@@ -16,6 +16,8 @@
       "/path/to/tmp/json",
       "--revision",
       "src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json b/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json
index 632a7c444..4fa67c755 100644
--- a/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json
+++ b/recipes/recipe_modules/bot_update/examples/full.expected/with_manifest_name.json
@@ -16,6 +16,8 @@
       "/path/to/tmp/json",
       "--revision",
       "src@2d72510e447ab60a9728aeea2362d8be2cbd7789",
+      "--refs",
+      "refs/heads/master",
       "--disable-syntax-validation"
     ],
     "env_suffixes": {
diff --git a/recipes/recipe_modules/bot_update/resources/bot_update.py b/recipes/recipe_modules/bot_update/resources/bot_update.py
index 10659d2e9..3bdafbdbd 100755
--- a/recipes/recipe_modules/bot_update/resources/bot_update.py
+++ b/recipes/recipe_modules/bot_update/resources/bot_update.py
@@ -724,6 +724,8 @@ def _git_checkout(sln, sln_dir, revisions, refs, no_fetch_tags, git_cache_dir,
       if not path.isdir(sln_dir):
         git('clone', '--no-checkout', '--local', '--shared', mirror_dir,
             sln_dir)
+        # Detach HEAD to be consistent with the non-clone case
+        git('checkout', 'master', '--detach', cwd=sln_dir)
         _git_disable_gc(sln_dir)
       else:
         _git_disable_gc(sln_dir)