logoalt Hacker News

therealmarvtoday at 1:59 AM1 replyview on HN

Maybe I'm stubborn, but even in the age of AI, I still use multiple git clones/directories of the same project, e.g.:

  ~/dev/projectx
  ~/dev/projectx2
  ~/dev/projectx3
  ~/dev/projectx4
very rarely use more than 4–5 per project. Maybe I'm just avoiding wrapping my head around worktrees and actually trying them out.

Benefits: These clones act as semi-permanent directories:

- Helps with caching for heavy Docker usage (think of repeated parallel unit, e2e tests)

- I've color-coded my terminal tabs for each clone so I can instantly tell where I am at a glance (kinda like tab groups just with colors)

Maybe if for some reason I need double digits clones of a project I will be more forced to use git worktrees because then it will be annoying to remember in which directory a branch clone lives.


Replies

agrmtoday at 2:33 AM

this is basically what worktrees do, though? except git 'knows' about all the associated branches, so you don't have to deal with pushing/pulling in order to merge xyz branch, etc.