Git repo archive quick reference

Jun 8, 2025, 11:24 PM
Δ
Jul 6, 2025, 7:58 AM
Tip

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:

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.)