til: You can git clone
Github gists
tl;dr Every Github Gist can be accessed as a Git repository over either HTTPS via their URL or via SSH using the keys you have registered with Github.

I enjoy using gists to share example code but when multiple files are necessary
it can be very cumbersome to copy and paste them one at a time and re-create
their metadata. Instead I create an otherwise empty gist, clone it locally, and
then edit the files or git add
them as I would any other repository before
committing and sharing the contents.
NB: The primary limitation of Gists as Git repositories is that they cannot contain directories and commits that introduce them will be rejected on push
~/tmp/demo (main) » git push origin
Enumerating objects: 5, done.
Counting objects: 100% (5/5), done.
Delta compression using up to 8 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (4/4), 545 bytes | 545.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
remote: Gist does not support directories.
remote: These are the directories that are causing problems:
remote: test
To gist.github.com:demo.git
! [remote rejected] main -> main (pre-receive hook declined)
error: failed to push some refs to 'gist.github.com:demo.git'