Git commit正在创建不必要的文件。怎么阻止它?

时间:2016-10-15 16:43:41

标签: git git-bash

当我在Git Bash中执行git commit时,它会弹出一条消息:

\Documents\revision_control\reflection\ -w does not exists. Create it?

error popup

我的Git Bash有什么问题?是否由于某些配置意外更改?我确定暂存区域里没有任何叫-w的东西。请参阅下面git status的输出:

On branch master
Initial commit
Changes to be committed:
(use "git rm --cached ..." to unstage)

    new file:   test.txt

1 个答案:

答案 0 :(得分:2)

The problem is in the .gitconfig file in my home directory.

It has the following line:

[core]
    editor = 'C:/Program Files (x86)/Notepad++/notepad++.exe' -n -w

removing the -w solves this issue