chomp twice the output of git commands

Sometimes, git adds an empty line at the end of its output.