instead of --git-dir, uses Dir.chdir