Include exit code in git error message

If git fails, the exit code is included into the message.