【问题标题】:Use globbed paths with git?在 git 中使用全局路径?
【发布时间】:2015-09-22 10:05:50
【问题描述】:

我现在在以前只使用.css 文件的项目中使用.sass 文件。

我逐个文件添加了.sass 和git add 文件。

现在我想在一个命令中删除我的所有.css 文件,在我的.gitignore 中添加*.css 和*.css.map 之后

这个命令在语法上有效吗?

git remove modules/**/*.css
git remove modules/**/*.css.map

【问题讨论】:

  • 我认为这更多地取决于 bash 是否理解 ** 而不是 git 本身。

标签: git glob


【解决方案1】:

尝试将remove 替换为rm:

git rm modules/**/*.css
git rm modules/**/*.css.map

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-03-04
    • 2021-04-28
    • 2015-03-08
    • 2013-01-26
    • 2014-10-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多