Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save bholmesdev/b245cbdcdde214b777b1a32125fdc49c to your computer and use it in GitHub Desktop.

Select an option

Save bholmesdev/b245cbdcdde214b777b1a32125fdc49c to your computer and use it in GitHub Desktop.
worktree with env symlinked
name = "Worktree: MY REPO"
[[panes]]
commands = [
"git worktree add -b {{autogenerated_branch_name}} ~/.warp/worktrees/MY_REPO/{{autogenerated_branch_name}}",
"cd ~/.warp/worktrees/MY_REPO/{{autogenerated_branch_name}}",
"find ~/Projects/MY_REPO -type f -name '.env.*' -exec sh -c 'for f do rel=\"${f#~/Projects/MY_REPO/}\"; [ -e \"$rel\" ] || [ -L \"$rel\" ] && continue; mkdir -p \"$(dirname \"$rel\")\"; ln -s \"$f\" \"$rel\"; done' sh {} +",
"pnpm i"
]
directory = "~/Projects/MY_REPO"
id = "main"
type = "terminal"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment