Remove trailing space when not in a git repo