小编Car*_*ink的帖子

不能使用git add with --patch选项

我最近更新了Git版本2.7.2.windows.1(我正在运行Windows 7 64位).自更新以来,我无法git add使用-p名称为_(下划线)的特定目录(或其子目录)中的文件选项运行.

git status 正确报告我的文件有变化:

PS C:\Users\Carl\www\dl> git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   _/php/class.Menu.php
Run Code Online (Sandbox Code Playgroud)

我可以用简单的方法添加整个文件git add,或者通过名称指定文件.但是,如果我尝试包含-p--patch选项(两个变体产生相同的结果),Git报告没有变化:

PS C:\Users\Carl\www\dl> git add -p .\_\php\class.Menu.php
No changes.
Run Code Online (Sandbox Code Playgroud)

这只发生在_目录中的文件中,但无论我是否cd进入该目录运行git add命令而不必明确指定其中带有下划线的路径都无关紧要; …

windows git filenames git-add

22
推荐指数
1
解决办法
1027
查看次数

标签 统计

filenames ×1

git ×1

git-add ×1

windows ×1