简体   繁体   中英

Git commit is creating unnecessary file. How to stop it?

When I execute git commit in Git Bash, it always pops up a message:

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

错误弹出

What is wrong with my Git Bash? Is it due to some configuration that was accidentally changed? I'm sure there's nothing called -w in the staging area. See output of git status below:

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

    new file:   test.txt

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM