Implement clicking to switch branches in the history.