简体   繁体   English

使用Windows 10 Powershell删除整个git

[英]Remove the entirety of git using powershell, Windows 10

So I have accidentally added git tracking to my entire desktop. 因此,我不小心将git跟踪添加到了整个桌面。 Could you help me by finding a solution, on how to remove it from my desktop, unfortunately this error pops. 不幸的是,此错误弹出,您可以通过找到一种解决方案来帮助我,该解决方案涉及如何从桌面上删除它。

`PS C:\Users\Anthony\Desktop> rmdir .git

rmdir : Cannot find path 'C:\\Users\\Anthony\\Desktop.git' because it does not exist.` rmdir:找不到路径'C:\\ Users \\ Anthony \\ Desktop.git',因为它不存在。

Is it hidden? 隐藏了吗? If so how do I find it? 如果可以,我如何找到它?

To find the root directory of your git repo : 找到git repo的根目录:

git rev-parse --show-toplevel

Then, try deleting the absolute path : <root_dir>\\.git 然后,尝试删除绝对路径: <root_dir>\\.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM