2009-10-08 7 views
8

C'è un modo per configurare Git per rimuovere il legno morto dal comando git status? Al posto di questa mostruosità:È possibile configurare 'git status' in modo che non fornisca il testo della guida?

# 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 

Voglio solo le informazioni chiave:

# On branch master 
# Changes to be committed: 
#  new file: README 
# 
# Changed but not updated: 
#  modified: FB.pm 
# 
# Untracked files: 
#  Foo.pl 

risposta

7

Tipo questo sulla vostra riga di comando locale:

git config --global advice.statushints false 
+0

Questo sembra promettente, ma non ha funzionato per me. La modifica della configurazione appare quando eseguo 'git config -l' ma non ha alcun effetto sull'output di' git status'. Sto eseguendo git versione 1.6.1.2 su cygwin, nel caso che importi. – FMc

+0

Non funziona qui con 1.6.4.4, neanche. Inoltre, 'man git-config' non menziona affatto questa impostazione. – Bombe

+3

Non l'ho trovato nella documentazione, l'ho trovato nel codice sorgente. È stato aggiunto in v1.6.4.2-270-gedf563f. Nessun documento è stato aggiornato per riflettere questa modifica: http://github.com/git/git/commit/edf563fbaa2ab50734db4a61e9092f25fbb5a417 – Dustin

1

È possibile utilizzare

git diff --name-status 

che mostrerà informazioni su file modificati e cancellati.

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 

tuttavia, non menzionerà i file che non sono stati aggiunti.

(source)

Problemi correlati