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…
18 posts tagged “git”.
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…
I previously wrote about Packaging a Python CLI tool for Homebrew. I've now figured out a pattern for automatically updating those formulas over time, using GitHub Actions.
I just spent way too long messing around with ChatGPT (transcript here) trying to figure this out. After much iteration, here's a recipe that works (mostly written by me at this point): The output…
First, checkout the cpython repo: $ git clone git@github.com:python/cpython cd into the directory: $ cd cpython/Doc To get a virtual environment with Sphinx and other required tools, run like this: $…
I wanted to convert a datetime object (from GitPython) to UTC without adding the dependency.
I wanted to know how large the deepseek-ai/DeepSeek-V3-Base repo on Hugging Face was without actually downloading all of the files. With some help from Claude, here's the recipe that worked.
I accidentally triggered a commit which added a big chunk of unwanted data to my repository. I didn't want this to stick around in the history forever, and no-one else was pulling from the repo, so I…
After rebasing a branch with 60+ commits onto I was disappointed to see that the commit dates on the commits (which are a different thing from the author dates) had all been reset to the same time.
I wanted to start a new git repository containing just the history of two specific files from my help-scraper repository.
https://www.w3.org/History/1991-WWW-NeXT/Implementation/ It's served up as a browseable Apache directory listing, but that's not the most delightful way to browse code - clicking a link to a file…
The homebrew-core repository contains all of the default formulas for Homebrew. It's a huge repo, and if you browse it through the GitHub web interface you can run into errors like this one…
My simonwillisonblog-backup workflow periodically creates a JSON backup of my blog's PostgreSQL database, using db-to-sqlite and sqlite-diffable.
I like to write the release notes for my projects by hand, but sometimes it can be useful to have some help along the way. Today I figured out this recipe.
This recipe runs a Python script to update a README, then commits it back to the parent repo but only if it has changed: My first attempt threw an error if I tried o run and the README had not…
I decided to make a GitHub repository public today that had previously been private. Unfortunately the revision history of that repository included some secret values, one of which I could not figure…
New feature announced here. Here's the full documentation. These are incredibly easy to use. GitHub creates a file in your workspace and puts the filename in , so you can build the summary markdown…
I figured this out in a Gist in 2016 which has attracted a bunch of comments over the years. Now I'm upgrading it to a retroactive TIL.
I fixed two bugs in Datasette using - a tool which lets you run an automated binary search against a commit log to find the source of a bug.