git - Pattern to remove a specific "/Folder/File.Ext" path combination in GIT
问题描述
My current GIT branch has some projects, all of them with "Debug" folders inside, that also contain .XML files I don't want to track.
Too late I noticed they all have got into my GIT index, and I want to remove them. I tested the bash command:
$ git rm --dry-run --cached "**/bin/Debug/*.xml"
But it shows that also undesirable subfolders will be included, as noted here (see file3.xml):
D:\TestFolder\Project\bin\Debug\file1.xml
D:\TestFolder\Project\bin\Debug\file2.xml
D:\TestFolder\Project\bin\Debug\AnotherFolder\file3.xml <--- !!!!
D:\TestFolder\Project\bin\Debug\file4.xml
Which search pattern will avoid file3.xml being included in the remove operation?
解决方案
推荐阅读
- javascript - Google Analytics 通过 trackingId 获取跟踪器
- javascript - 使用通用javascript时无法访问Vue组件中的DOM元素
- powershell - 使用 Powershell 读/写公共信息 AD
- javascript - 使用 JS 和 NodeJS 上传文件发布请求
- django - 从 django taggit 获取相同类型的相似对象
- cmake - cuda&visual studio的cmake设置
- c++ - 当我编译 CLR C++ 应用程序的“发布”版本时,除了 GUI 之外,我还会弹出一个 cmd 窗口。我该如何解决这个问题?
- sql - 如何从闰年或正常年获得一致的周数
- php - Wordpress:如何在管理员帖子列表中添加发布/草稿按钮
- slider - Shopify 图片宽度滑块不起作用