Skip to content
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
Cannot retrieve contributors at this time
layout title
Persistent git log with git loglive

I recently watched a talk by Tim Berglund on advanced git - wherein he demos some git plumbing commands with a git log that keeps refreshing.

It looks like this:

This is incredibly useful for visualizing what's happening to your repository as you switch between and modify branches.

The code below has been reproduced from his original gist


while :
    git --no-pager log --graph --pretty=oneline --abbrev-commit --decorate --all $*
    sleep 1

I had to create a new file with the above contents somewhere in my PATH. I created a file called git-loglive in /usr/local/bin/

If your commit history is longer than your terminal window is tall, you might need to specify that you only want the top 10 commits or so.

$ git loglive -10