首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >是否可以配置“git status”,使其不提供帮助文本?

是否可以配置“git status”,使其不提供帮助文本?
EN

Stack Overflow用户
提问于 2009-10-08 04:55:19
回答 3查看 243关注 0票数 8

有没有办法将Git配置为删除git status命令中的死木?而不是这个怪物:

代码语言:javascript
复制
# 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

我只需要关键信息:

代码语言:javascript
复制
# On branch master
# Changes to be committed:
#       new file:   README
#
# Changed but not updated:
#       modified:   FB.pm
#
# Untracked files:
#       Foo.pl
EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2009-10-08 05:22:05

在本地命令行中键入以下内容:

代码语言:javascript
复制
git config --global advice.statushints false
票数 7
EN

Stack Overflow用户

发布于 2009-10-08 05:22:46

您可以使用

代码语言:javascript
复制
git diff --name-status

它将显示有关已修改和已删除文件的信息。

代码语言:javascript
复制
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)

票数 1
EN

Stack Overflow用户

发布于 2009-10-08 15:51:01

请参见提交status: make "how to stage" messages optional。相应的配置属性为statusHints。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/1535708

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档