Repository

alxwrd/git-env

git-env

Sync environment files across linked git worktrees

3stars

Open github.com

alxwrd/git-env

git-env

A Git extension to sync environment files across linked Git worktrees, copying .env files from the primary worktree to linked ones.

Visit project

Show me a random project

First shared
Jul 2, 2026
HN activity
20

Show HN@alxwrdJul 2, 2026

Show HN: A tool to sync env files to your Git worktrees

I've been trying out different "worktree tools" recently (Conductor [1], Emdash [2], Sculptor [3], and Superset [4]). One problem I've been having is not all the tools support automatically copying .env files into worktrees. All of them support running a setup script however. Copying a bash snippet to do the copying was getting tedious - so I've put together a small tool/git extension to solve my problem. $ cd ~/repos/myproject # primary worktree, has .env $ git worktree add ~/worktrees/my-feature # create a linked worktree $ cd ~/worktrees/my-feature $ git env sync # copy .env from the primary synced .env 1 files synced, 0 unchanged, 0 conflicts skipped Sharing in case it solves anyone else's problem [1] https://www.conductor.build/ [2] https://emdash.sh/ [3] https://github.com/imbue-ai/sculptor [4] https://superset.sh/

Community

Hacker News discussion

Loading the thread…