diff --git a/Library/Homebrew/download_strategy.rb b/Library/Homebrew/download_strategy.rb index 536c22481d..f4305e429d 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