properly update commits list when clicking