git - 尽管文件存在,但Git找不到该文件
问题描述
尽管文件存在,但Git找不到该文件
下面是Git bash
$ git status
On branch WI
Your branch is up to date with 'origin/WI'.
Untracked files:
(use "git add <file>..." to include in what will be committed)
csvTrainImages 13440x1024.csv
nothing added to commit but untracked files present (use "git add" to track)
BC@DESKTOP-USA MIN ~/Documents/GitHub/A/data (WI)
$ git add csvTrainImages 13440x1024.csv
fatal: pathspec 'csvTrainImages' did not match any files
解决方案
我认为这是由于文件名中的空格。因此,应在终端中提及添加名称以空格分隔的任何此类文件,如下所示:
git add csvTrainImages\ 13440x1024.csv
推荐阅读
- php - 在我的 laravel 项目中,assertStatus(200) 的 PHPUnit 测试失败
- android - 适配器未以任何方式激活
- shell - 使用 html 表和 xl 附件向用户发送邮件的 unix shell 脚本
- elasticsearch - 日期格式在 kibana 的日期直方图中不起作用
- google-sheets - 谷歌电子表格查询失败
- node.js - 如何修复在 Balena 上运行的树莓派 3 上的无效 ELF 标头错误?
- azure-devops - 向破坏 azure devops 构建的罪魁祸首发送自定义电子邮件
- tensorflow - Keras中VDSR的剩余损失计算
- javascript - 通过 jquery 永久删除一个 div(也从视图源中)
- azure - 在 .net 核心应用程序中使用 Loggerfactory 自定义日志消息