Skip to content

Instantly share code, notes, and snippets.

@arialdomartini
Created February 28, 2014 14:44
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save arialdomartini/721c2be0d4edc6f0b5ac to your computer and use it in GitHub Desktop.
Save arialdomartini/721c2be0d4edc6f0b5ac to your computer and use it in GitHub Desktop.
A dead stupid bash git-dashboard
w() {
clear && ls -l && echo && git branch && echo && git status --short --branch
}
dn() {
git status --short --branch | grep '^.[DM\?]' | head -1 | awk '$1 ~ /[MD]/ {print $2} $1 ~ /\?/ {print "/dev/null " $2}' | xargs git diff -- && w
}
an() {
git status --short --branch | grep '^.[DM\?]' | head -1 | awk '$1 ~ /[M?]/ {print "add " $2} $1 ~ /D/ {print "rm " $2}' | xargs git && w
}
@fibo
Copy link

fibo commented Dec 10, 2015

You are overriding the /usr/bin/w command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment