--git-dir cannot really be used the way I thought it could be so I changed the git commands back to how they were.