Celebrating 10 Years!

profile picture

Make Git Friendlier: status

August 05, 2013 - Roundwall Software

Since I couldn’t sleep tonight, I watched a presentation by this guy Zach Holman who works for GitHub.

One tip he shares makes the output from git status much friendlier and I thought I’d share it so you don’t have to watch an hour of talking to find out about it.

Instead of:

git status

try typing:

git status -sb

I went so far as to add this to my ~/.zshrc file:

alias stat='git status -sb

Basically, it makes the output from git go from something like this:

 sgoodwin:Parts/ (master\*) \$ git status [4:13:13]
 On branch master
 Changes not staged for commit:
 (use “git add …” to update what will be committed)
 (use “git checkout — …” to discard changes in working directory)
 modified: Parts/Parts-Info.plist
 modified: Parts/RWSAppDelegate.m
 modified: Parts/RWSListsStore.m
 modified: Parts/RWSListsViewController.h
 modified: Parts/RWSListsViewController.m
 no changes added to commit (use “git add” and/or “git commit -a”)

to something more like this:

sgoodwin:Parts/ (master\*) \$ stat [4:13:40]
master
M Parts/Parts-Info.plist
M Parts/RWSAppDelegate.m
M Parts/RWSListsStore.m
M Parts/RWSListsViewController.h
M Parts/RWSListsViewController.m

which is so much nicer because I don’t need all that other junk (also it’s in color if you have that turned on).

Happy coding!