How to deal with missing .git folder in zip downloads


My main project regulary has users that download the repository through the ‘Download Zip’ function.

This zip archive does not include the .git folder. Which causes two issues:

  1. There is now commit hash that can be referenced in logs, etc. thus making it difficult to ensure the user really has the latest version.

  2. Submodules are unavailable and cannot be simply initialized with a ‘git submodule update --init --recursive’

Are there recommended ways to work around this?

Do I have to manually update a file with the wished information before pushing or is there a way to automate that in a simple fashion?

Hi @tis-edgar,

Thanks for being part of the GitHub Community Forum! 

The ZIP archive actually doesn’t download the Git history by design. If someone wants to work on a project and make changes, they’ll need to clone the repository rather than download the ZIP file. I’d recommend instructing users experiencing those issues to clone the repo instead.

Let us know if you have further questions!

1 Like

it seems that no matter if i use git over https or git over ssh someone slows down this tcp/ip stream, is there a way to get the zip with .git directory? The funny thing is, that when i download it with browser i get full speed at 20Mbit but over git clone only 1Mbit