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