trim newlines off results of git commands