Git repo archive quick reference
Here’s a snippet for grabbing an archive of a git repo:
git archive --remote=ssh://git@git.disroot.org/mostol/notes.git main:post | tar -x -C my_new_dir
Some reference for this:
- https://stackoverflow.com/questions/160608/do-a-git-export-like-svn-export
Unfortunately, not every protocol (e.g. https) is supported by every git host, which is why I ended up taking a different approach for deploying this site. (I download the tar.gz file and pull out the directories I need.)