better git panic function