Fixed error when using git executable

`git branch` does not return anything if there are no commits, thus travis build 
fails