I know that one can make a zip of the current branch by:
git archive -o archive.zip HEAD
However, at situations, one may want to clone a copy/snapshot of remote repository at a specific branch because:
1) The repository is large with long history and cloning the whole history takes too much time.
2) What I want is a specific branch’s “snapshot” not the master branch’s.
To take a snapshot (no history, only files at HEAD) from branch br1 from firstname.lastname@example.org:repo:
git clone -b br1 email@example.com:repo --depth 1
-b br1 makes git clone the branch br1.
--depth 1 makes git only fetch the history of depth 1