A brain-dead alternative to git worktrees.
Work on multiple branches at once. No stashing, no context switching.
lane aCreates a copy of your repo at my-app-lane-a/ and cd's into it.
git clone https://github.com/benhylak/lane.git
npm install -g ./lane
lane init-shell
source ~/.zshrclane a # Create or switch to lane "a"
lane # Interactive picker
lane - # Previous lane
lane main # Back to main repo
lane rename b # Rename current lane to "b"
lane remove a # Delete lane "a"
lane checkout feature/x # Find lane by branch, or create one
lane sync # Copy .env files from main
lane config # Settings~/my-app/ # Main repo
~/my-app-lane-a/ # Lane "a" (on feature/login)
~/my-app-lane-b/ # Lane "b" (on fix/bug-123)
Lane name ≠ branch. Lanes are just folders. git checkout any branch in any lane.
While you should probably use git worktrees, they don't copy your .env files, you can't checkout the same branch twice, and deleting them wrong leaves orphaned refs. Minor annoyances, but annoying enough for me not have built the habit of using them. Lane just copies the whole folder.
Run lane config to change:
- Copy Mode:
full(default) orworktree(experimental) - Skip Build Artifacts: Skip
node_modules,dist, etc when copying - Auto Install: Run
npm installafter creating a lane
Worktree mode uses git worktrees under the hood, but copies untracked files (like .env) automatically. Faster than full copy, but has the usual worktree quirks (can't checkout same branch twice, etc).
MIT