Skip to content

Git - Options for discovering Git repositories outside the workspace  #169256

@lszomoru

Description

@lszomoru

The default value of the git.autoRepositoryDetection setting is true so Git repositories are discovered based on the workspace folders, and parent folders of the opened files. There are scenarios in which the Git repository root is outside the workspace folder. This is a valuable feature as it allows users to open a subfolder of a Git repository yet have the ability to perform source control operations.

Unfortunately this behaviour also has some negative side-effects. The most extreme scenario is when one opens a loose file from the home folder, and there is a Git repository in the home directory. This can cause confusion as there are lots of changes in the "Source Control" view and discarding those changes results in data loss.

//cc @digitarald

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitygitGIT issueson-release-notesIssue/pull request mentioned in release noteson-testplan

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions