-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
ADR 001
An interesting thought came to my mind, simplify the logic further and use git config core.worktree . It sounded like an amazing solution, using git to store all the info, great right? So I checked it out:
I tried git config core.worktree ../gits in a test repo and guess what ?
Got this message first: fatal: cannot chdir to '../gits': No such file or directory
Okay I tried ...
❯ git config core.worktree
fatal: cannot chdir to '../gits': No such file or directory
Nope , all the git commands status, pull , remote failed at this point.
Finally I solved by setting the env var: GIT_WORK_TREE
In short , I realized something very important. Devs tend to move git repos here and there. Its important that the worktree shouldn't be hardcoded at any point of time.
Conclusion
Use env var : GIT_WORK_TREE over git config core.worktree over initialization
Metadata
Metadata
Assignees
Labels
No labels