Skip to content
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

Git: Can't delete a git repo folder which is open in vscode #84950

Closed
LambdaAlpha opened this issue Nov 16, 2019 · 8 comments
Closed

Git: Can't delete a git repo folder which is open in vscode #84950

LambdaAlpha opened this issue Nov 16, 2019 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues windows VS Code on Windows issues wont-fix
Milestone

Comments

@LambdaAlpha
Copy link

Issue Type: Bug

  1. create a folder named "test"
  2. git init it
  3. open this folder in vscode (with all user extension disabled)
  4. try delete it in vscode or in file explorer
  5. the system will alert that i need admin permission and then alert that i need xxx user permission to delete it, and finally the folder still cannot be deleted.
  6. close vscode
  7. try delete it in file explorer
  8. success without any alert

VS Code version: Code 1.40.1 (8795a98, 2019-11-13T16:49:35.976Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i5-8250U CPU @ 1.60GHz (8 x 1800)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: enabled
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 7.93GB (3.82GB free)
Process Argv
Screen Reader no
VM 0%
Extensions: none
@vscodebot
Copy link

vscodebot bot commented Nov 16, 2019

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

@nathonius
Copy link

nathonius commented Nov 18, 2019

I've seen similar behavior trying to do a git reset. Even if the files aren't currently open in VS Code, but the containing folder is opened, Windows complains that it can't remove them as they are being used by another process.

I see this behavior most consistently after stopping debugging.

@vscodebot vscodebot bot removed the new release label Nov 18, 2019
@joaomoreno
Copy link
Member

Can you find out which specific process holds a handle to which file in that folder? https://serverfault.com/questions/1966/how-do-you-find-what-process-is-holding-a-file-open-in-windows

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Nov 19, 2019
@LambdaAlpha
Copy link
Author

image
@joaomoreno

@joaomoreno
Copy link
Member

Can you find out the full Command Line of that process?

@LambdaAlpha
Copy link
Author

Can you find out the full Command Line of that process?

@joaomoreno Sorry, I don't understand what you mean.

@joaomoreno
Copy link
Member

Related to nodejs/node-v0.x-archive#8371 (comment), very likely won't fix any time soon.

@joaomoreno joaomoreno changed the title can't delete a git repo folder which opened in vscode Git: Can't delete a git repo folder which is open in vscode Nov 20, 2019
@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug git GIT issues windows VS Code on Windows issues and removed info-needed Issue requires more information from poster labels Nov 20, 2019
@joaomoreno joaomoreno added this to the Backlog milestone Nov 20, 2019
@mccart
Copy link

mccart commented Feb 23, 2020

I do not know if this is related or not - apparently vscode is not respecting .gitignore file.
In .gitignore, there is web/app/vendor line, and when running docker-compose up, it's generating files in that app/vendor directories - and apparently vscode is generating .git/refs for those files.
That causes problems - I could not remove those directories unless I exit out of vscode

composer_1 | [RuntimeException]
composer_1 | Could not delete /app/vendor/phpdocumentor/reflection-common/.git/refs:

@github-actions github-actions bot locked and limited conversation to collaborators Dec 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues windows VS Code on Windows issues wont-fix
Projects
None yet
Development

No branches or pull requests

4 participants