run the git commands in the proper directory