In Git Bash I've tried to use this command:
$ git archive -o test.tar.gz master
gzip: compressed data not written to a terminal. Use -f to force compression.
For help, type: gzip -h
The file test.tar.gz is empty, but my repository is not empty and creating a zip file works fine (contains all my source files)! Why does the tarball format fail to produce an archive?