CARVIEW |
Select Language
HTTP/2 200
date: Fri, 10 Oct 2025 10:05:42 GMT
server: Fly/6f91d33b9d (2025-10-08)
content-type: text/html; charset=utf-8
content-encoding: gzip
via: 2 fly.io, 2 fly.io
fly-request-id: 01K76SAQAPPXQXZKWR4K2M35RH-bom
Clone, edit and push files that live in a Gist | Simon Willison’s TILs
Clone, edit and push files that live in a Gist
GitHub Gists are full Git repositories, and can be cloned and pushed to.
You can clone them anonymously (read-only) just using their URL:
git clone https://gist.github.com/simonw/0a30d52feeb3ff60f7d8636b0bde296b
But if you want to be able to make local edits and then push them back, you need to use this recipe instead:
git clone git@gist.github.com:0a30d52feeb3ff60f7d8636b0bde296b.git
You can find this in the "Embed" menu, as the "Clone via SSH" option.
This only uses the Gist's ID, the simonw/
part from the URL is omitted.
This uses your existing GitHub SSH credentials.
You can then edit files in that repository and commit and push them like this:
cd 0a30d52feeb3ff60f7d8636b0bde296b
# Edit files here
git commit -m "Edited some files" -a
git push
Related
- github Migrating a GitHub wiki from one repository to another - 2022-07-28
- github-actions Serving a JavaScript project built using Vite from GitHub Pages - 2023-10-23
- git How to create a tarball of a git repository using "git archive" - 2022-11-15
- github GitHub Pages: The Missing Manual - 2022-10-31
- github Transferring a GitHub issue from a private to a public repository - 2021-12-22
- git Rewriting a repo to contain the history of just specific files - 2022-03-22
- github-actions GitHub Actions job summaries - 2022-05-17
- github Bulk editing status in GitHub Projects - 2023-06-29
- github-actions Commit a file if it changed - 2020-04-19
- git Rewriting a Git repo to remove secrets from the history - 2023-01-24
Created 2022-09-08T13:47:18-07:00, updated 2022-09-08T15:03:45-07:00 · History · Edit