Skip to content

Instantly share code, notes, and snippets.

@GusGA
Last active February 29, 2016 18:44
Show Gist options
  • Save GusGA/cb47641ba8ce7e0791e9 to your computer and use it in GitHub Desktop.
Save GusGA/cb47641ba8ce7e0791e9 to your computer and use it in GitHub Desktop.
Git repo real time status
#!/bin/bash
while :
do
clear
date +"%A %B %d, %Y at %T"
lines=`tput lines`
lines=`expr $lines - 5`
git --no-pager log --color --all --pretty='format:%C(auto)%d%Creset %C(yellow)%h%Creset %C(green)%an%Creset - %s - %C(cyan)%cr%Creset' --graph $* | head -n $lines
sleep 1
done
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
unpushed = log --branches --not --remotes --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
undo = reset --hard HEAD^
glog = log --all --pretty='format:%d %Cgreen%h%Creset %an - %s' --graph
st = status
ci = commit
co = checkout
ru = remote update
br = branch
cam = commit -a -m
praise = blame
staged = diff --cached
unstaged = diff
both = diff HEAD
oneline = log --oneline
amend = commit --amend
tree = log --graph --decorate --pretty=oneline --abbrev-commit --all
myhist = !git log --author=\"$(git config user.name)\" --format=%H |xargs git show --name-only --format=-------------%n%Cred%s%Creset%n%Cblue%h%Creset
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
cleanup = !git branch --merged | grep -v '*' | xargs git branch -d
#!/bin/bash
while :
do
clear
date +"%A %B %d, %Y at %T"
lines=`tput lines`
lines=`expr $lines - 5`
git --no-pager log --graph --decorate --pretty=oneline --abbrev-commit --color --all $* | head -n $lines
sleep 1
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment