Does the .git directory exist?

Hi there,

Thanks for reaching out.

I took a look at the build logic and it does seem we remove the .git folder on Docker builds as we’ve seen scenarios where it caused issues with buildkit caching when present.

There isn’t a way to disable this deletion and would be curious to know the use case so I could feedback to the team. For example, if you’re looking to do something like adding the commit SHA to the app as an identifier of what’s deployed, the RENDER_GIT_COMMIT env var should be available.

Kind regards

Alan

1 Like