From 969a3bdf5dda4676b4b2c5997e5db9f5b0052308 Mon Sep 17 00:00:00 2001 From: Claudio Ortolina Date: Wed, 27 Aug 2025 16:55:45 +0300 Subject: [PATCH] Do not copy any git ref in Docker images Theory here is that this is what makes caching fail, because HEAD changes at every push --- .dockerignore | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index 688d1551..9c111048 100644 --- a/.dockerignore +++ b/.dockerignore @@ -19,13 +19,8 @@ .DS_Store **/.DS_Store -# Ignore git, but keep git HEAD and refs to access current commit hash if needed: -# -# $ cat .git/HEAD | awk '{print ".git/"$2}' | xargs cat -# d0b8727759e1e0e7aa3d41707d12376e373d5ecc +# Ignore git .git -!.git/HEAD -!.git/refs # Common development/test artifacts /cover/