6 ms·
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/ https://www.conductor.build/
[2] https://emdash.sh/ https://emdash.sh/
[3] https://github.com/imbue-ai/sculptor https://github.com/imbue-ai/sculptor
[4] https://superset.sh/ https://superset.sh/