Moving the code the figures out the repo to inside the command

It was getting run when the commands were added and if your env doesn't have git, that caused problems.  I don't love the code dupe, tho.  I think it's simpler than alternatives, though.