有没有办法配置Git从git status
命令中删除死木?而不是这种怪异:
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: README
#
# Changed but not updated:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: FB.pm
#
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# Foo.pl
我只想要关键信息:
# On branch master
# Changes to be committed:
# new file: README
#
# Changed but not updated:
# modified: FB.pm
#
# Untracked files:
# Foo.pl
答案 0 :(得分:7)
在本地命令行上输入:
git config --global advice.statushints false
答案 1 :(得分:1)
您可以使用
git diff --name-status
将显示有关已修改和已删除文件的信息。
M app/controllers/truck_def_controller.rb
M app/models/truck.rb
M app/views/prob_def/new_truck.haml
M db/development.sqlite3
M public/javascripts/truck.js
D public/stylesheets/scaffold.css
但是,它不会提及尚未添加的文件。
(source)
答案 2 :(得分:1)
见commit status: make "how to stage" messages optional。相应的配置属性是statusHints。