Improve git branch matching