Settings

Theme

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

github.com

2 points by alxwrd · 0 comments · 1 min read

Reader

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/

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection