Git Worktree Support #6918
jonny-harte
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The Salesforce VSCode extension does not currently work correctly when using Git worktrees, making it difficult to adopt modern Git workflows that are increasingly common in enterprise development.
Current Behaviour
When using Git worktrees, the SF extension fails to resolve the correct project root, resulting in the following error when attempting to deploy or retrieve metadata:
Additionally, org configuration (
.sf/config.json) is not inherited by worktrees, requiring each worktree to be manually configured with a target org — or falling back to a global default which conflicts with multi-project setups.Expected Behaviour
sfdx-project.jsonfrom within a worktreeUse Case
Git worktrees are particularly valuable for Salesforce consultants and developers who need to:
Without worktree support, developers are forced to maintain separate clones of the same repository, which is exactly the problem worktrees are designed to solve.
Environment
Suggested Solution
sfdx-project.json, respecting worktree boundaries.sf/config.jsonto be resolved from a common parent directory shared by all worktreesBeta Was this translation helpful? Give feedback.
All reactions