【发布时间】:2023-02-03 01:25:14
【问题描述】:
我正在按照指南确保您的 JavaScript 和 CSS 文件在您通过添加更新时始终刷新?v=到文件名。但是 Windows 和 git 不喜欢这种命名约定,但我确实设法命名了文件审计.css到audit.css?v=1.0使用Cygwin.然而作为混帐不喜欢这个文件名,它卡在要提交的更改中。我怎样才能删除删除改变这个文件?我已经尝试对 stackoverflow 上的其他页面进行一些更改,但都失败了。
Cygwin$ git status
On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
renamed: audit.css?v=1.0 -> audit.css
Cygwin$ git restore --staged audit.css
Cygwin$ git status
On branch main
Changes to be committed:
(use "git restore --staged <file>..." to unstage)
deleted: audit.css?v=1.0
Cygwin$ git restore --staged audit.css?v=1.0
error: invalid path 'audit.css?v=1.0'
Cygwin$ git reset 'audit.css?v=1.0'
error: invalid path 'audit.css?v=1.0'
fatal: make_cache_entry failed for path 'audit.css?v=1.0'
【问题讨论】:
标签: git