Re your point, git archive <- This would be the perfect solution ...but it only has 2 possible formats: tar or zip, you can add new formats using documentation from the EXAMPLES section of the git-archive(1) man page:
git config tar.tar.xz.command "xz -c"
Configure a "tar.xz" format for making LZMA-compressed tarfiles.
You can use it specifying --format=tar.xz, or by creating an output
file like -o foo.tar.xz.
While being "on Windows" is generally considered an impediment to many tasks, with a little extra work, you can almost catch up to the folks running other operating systems by using software like Cygwin or MKS Toolkit.
If after confirming that whatever command you need is available from within your shell, this sort of git config … command still doesn't work for you, then you should perhaps post additional details about your configuration in a question on SuperUser.com.
As noted by jbruni in the comments, you can list the available formats for your installation using git archive --list.
Note that "git archive --list extra garbage"(man) silently ignored excess command line parameters, which has been corrected with Git 2.44 (Q1 2024).
See commit d6b6cd1 (21 Dec 2023) by Junio C Hamano (gitster).
(Merged by Junio C Hamano -- gitster -- in commit 6bf317d, 08 Jan 2024)
archive: "--list" does not take further options
"git archive --list blah"(man) should notice an extra command line parameter that goes unused.
Make it so.
The error message would now be:
extra command line parameter 'blah'
git archiveworks from a local clone so that is back to square 1: how to download only the latest manifest.git clone --depth 1is what you need, read the documentation that Bruno is linking to and his comment.--depth 1. You still have to delete the.gitfolder afterwards. There is no getting around that.