Git cleanup

Was working on my prompt and decided to clean up the git functions a bit.

I also incorporated tedv’s pull request #1263 which I think makes a lot of sense.