handle new and deleted branches