Skip to content

Instantly share code, notes, and snippets.

@realtimeprojects
Last active June 20, 2018 06:08
Show Gist options
  • Save realtimeprojects/c4d08119aff01548c441 to your computer and use it in GitHub Desktop.
Save realtimeprojects/c4d08119aff01548c441 to your computer and use it in GitHub Desktop.
a live tree view of my current git repository
#!/bin/bash
# usage: git loglive 20
while :
do
tput clear
git --no-pager log -$1 --graph --full-history --all --color --date=short --pretty=format:"%Cred%x09%h %Creset%ad%Cblue%d %Creset %s %C(bold)(%an)%Creset"
sleep 1
done
@concrain
Copy link

concrain commented Jun 20, 2018

fatal: unrecognized argument: -

git --no-pager log --$1 ...
I needed to add a second dash in front of the '$1'

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