diff --git a/cmake/modules/DownloadProject.CMakeLists.cmake.in b/cmake/modules/DownloadProject.CMakeLists.cmake.in
index 89be4fdd4f2e0db8d22c47d4d3f8c664078c7768..f40aaf67fdf5383ee72234ac337281091db733aa 100644
--- a/cmake/modules/DownloadProject.CMakeLists.cmake.in
+++ b/cmake/modules/DownloadProject.CMakeLists.cmake.in
@@ -14,4 +14,5 @@ ExternalProject_Add(${DL_ARGS_PROJ}-download
                     BUILD_COMMAND       ""
                     INSTALL_COMMAND     ""
                     TEST_COMMAND        ""
+                    GIT_CONFIG          advice.detachedHead=false
 )