s
March 6, 2024, 3:21 p.m. |

Simon Willison's Weblog simonwillison.net

How I use git worktrees


TIL about worktrees, a Git feature that lets you have multiple repository branches checked out to separate directories at the same time.


The default UI for them is a little unergonomic (classic Git) but Bill Mill here shares a neat utility script for managing them in a more convenient way.


One particularly neat trick: Bill's "worktree" Bash script checks for a node_modules folder and, if one exists, duplicates it to the new directory using copy-on-write, …

bill feature git multiple shares them til utility

Data Engineer

@ Lemon.io | Remote: Europe, LATAM, Canada, UK, Asia, Oceania

Artificial Intelligence – Bioinformatic Expert

@ University of Texas Medical Branch | Galveston, TX

Lead Developer (AI)

@ Cere Network | San Francisco, US

Research Engineer

@ Allora Labs | Remote

Ecosystem Manager

@ Allora Labs | Remote

Founding AI Engineer, Agents

@ Occam AI | New York