I use tig everyday. It’s the most convenient command line interface to have a quick overview what happened in a Git repository.
(Stolen from http://jonas.nitro.dk/tig/screenshots/ as of 17th May 2016)
Now, I usually have my tig instance sitting in some terminal window all day long.
This means that new things happen in the repository while tig is running.
One can press
F5 to reload the screen.
This will bring up staged changes or new commits.
However, it will not show newly added branches.
My dead simple but efficient solution to this problem is the following alias:
tig --all causes tig to display all branches by default.)
In this endless loop, pressing
q quits tig and starts a new instance showing newly added branches.
sleep command helps to easily get out of the loop with
Obviously, this endless while loop is always handy some action needs to be performed repeatedly. I used this approach on a server machine where I had to read the local mails quite often due to some cron job:
while; do; $EDITOR /var/mail/$USER; sleep 1; done
Re-opening the mail file makes sure the system knows the has read her mails.
That’s about it! KISS!