不小心 git add 了多余的文件,通过 git reset 去除多余文件:
haohu@Henry-PC MINGW64 /e/study/JS-learn (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: test/.index.html.un~
new file: test/.json-compound.js.un~
new file: test/all-words.json
new file: test/index.html
new file: test/index.html~
new file: test/json-compound.js
new file: test/public/.style.css.un~
new file: test/public/style.css
new file: test/public/style.css~
haohu@Henry-PC MINGW64 /e/study/JS-learn (master)
$ git reset HEAD *~
haohu@Henry-PC MINGW64 /e/study/JS-learn (master)
$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: test/all-words.json
new file: test/index.html
new file: test/json-compound.js
new file: test/public/style.css
Untracked files:
(use "git add <file>..." to include in what will be committed)
test/.index.html.un~
test/.json-compound.js.un~
test/index.html~
test/public/.style.css.un~
test/public/style.css~
查看 global 配置
git config --global --list