Last Updated: June 28, 2016
·
1.283K
· ryrych

Silent git status

Most often you don’t need the whole git status output. git gives you the less verbose version: git status -s. Please compare.

➜  dotfiles git:(master) ✗ git status
On branch master
Your branch is ahead of 'origin/master' by 3 commits.
  (use "git push" to publish your local commits)
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

    modified:   vimrc
    modified:   vimrc.augroups
    modified:   vimrc.bundles
    modified:   vimrc.writing
    modified:   zshrc

no changes added to commit (use "git add" and/or "git commit -a")
➜  dotfiles git:(master) ✗ git status -s
 M vimrc
 M vimrc.augroups
 M vimrc.bundles
 M vimrc.writing
 M zshrc

To run the command faster you can add an alias to .zshrc or .bashrc:

alias gs="git status -s"