Add git branch finder and test

@txels 

This is now a full-blown PR