Better git branch parsing