Is there a way to configure Git to remove the dead wood from the git status
command? Instead of this monstrosity:
# 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
I want only the key information:
# On branch master
# Changes to be committed:
# new file: README
#
# Changed but not updated:
# modified: FB.pm
#
# Untracked files:
# Foo.pl
The git status command displays the state of the working directory and the staging area. It lets you see which changes have been staged, which haven't, and which files aren't being tracked by Git. Status output does not show you any information regarding the committed project history.
When in doubt, run git status . This is always a good idea. The git status command only outputs information, it won't modify commits or changes in your local repository. A useful feature of git status is that it will provide helpful information depending on your current situation.
The git config command is a convenience function that is used to set Git configuration values on a global or local project level. These configuration levels correspond to . gitconfig text files. Executing git config will modify a configuration text file.
# There are 3 levels of git config; project, global and system.
Type this on your local commandline:
git config --global advice.statushints false
You can use
git diff --name-status
which will show information about modified and deleted files.
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
it won't, however, mention files that haven't been added.
(source)
see commit status: make "how to stage" messages optional. the corresponding config property is statusHints.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With