Handle errors while running Git on the shell