Skip to content

Git checkout issues when a VS Code workspace has a child directory of git repo as a folder #67951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jextrevor opened this issue Feb 5, 2019 · 3 comments
Assignees
Labels
git GIT issues

Comments

@jextrevor
Copy link

Issue Type: Bug

Steps to Reproduce:

  1. Create a git repo.
  2. Create a VS Code workspace and save it as e.g. example.code-workspace.
  3. Create a folder inside the git repo, a file inside that folder, and commit.
  4. Create a new branch in the git repo, remove the file and folder, and commit.
  5. Checkout the main branch, and add the folder to the code workspace.
  6. Checkout the other branch.
  • Expected: the folder and file should be deleted.
  • Actual: the folder and file stick around, and any attempts to delete them, recreate them, or cd into them results in Permission denied.
  1. Checkout the main branch.
  • Expected: the folder and file should be recreated without any issue.
  • Actual: git checkout fails with fatal: cannot create directory at 'folder': Permission denied

When I have git repositories that make use of code workspaces to organize subdirectories, these behavioral inconsistencies are very annoying. I end up having to close VS code, perform the checkout using Git Bash, and reopen VS Code.

VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:54:13.295Z)
OS version: Windows_NT x64 10.0.17134

System Info
Item Value
CPUs Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (8 x 3392)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: unavailable_off
Memory (System) 15.91GB (8.35GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (13)
Extension Author (truncated) Version
npm-intellisense chr 1.3.0
bracket-pair-colorizer Coe 1.0.61
vscode-eslint dba 1.8.0
gitlens eam 9.4.1
vscode-npm-script eg2 0.3.5
prettier-vscode esb 1.8.1
vscode-nuget-package-manager jmr 1.1.6
theme-monokai-pro-vscode mon 1.1.9
csharp ms- 1.17.1
debugger-for-chrome msj 4.11.1
uuid-generator net 0.0.3
vetur oct 0.14.5
gitconfig sid 2.0.0

(6 theme extensions excluded)

@vscodebot
Copy link

vscodebot bot commented Feb 5, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the git GIT issues label Feb 5, 2019
@joaomoreno
Copy link
Member

@bpasero Duplicate of #41085, blocked by #3025

@jextrevor
Copy link
Author

This is not necessarily a duplicate of #41085. The issue is not that VS Code does not detect some change in the git branch. The problem is that VS Code somehow prevents git from modifying folders that are part of a code workspace. The issue articulated in #3025 and #41085 is different from this issue.

@vscodebot vscodebot bot locked and limited conversation to collaborators Mar 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

No branches or pull requests

2 participants