diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb
index 536c22481d5a93f02d9929392fbad1f8aa366bf7..f4305e429d728fdf8f87944008e76e2ccf4182e5 100644
--- a/Library/Homebrew/download_strategy.rb
+++ b/Library/Homebrew/download_strategy.rb
@@ -757,6 +757,7 @@ class GitDownloadStrategy < VCSDownloadStrategy
     case @ref_type
     when :branch, :tag
       args << "--branch" << @ref
+      args << "-c" << "advice.detachedHead=false" # silences detached head warning
     end
 
     args << @url << cached_location