Submitting a remote build with gcloud container builds submit --config cloudbuild.yaml, the .git directory never showed up in the build context even though there was no .dockerignore, no .gitignore, no .gcloudignore, and no "Some files were not included" message. Other hidden directories (like a test .foo dir) did show up, so only .git was being excluded. The Dockerfile needed .git to stamp the git revision into the app, so all remote builds failed while local builds worked.