After creating or cloning your repository, you can move the .git - .git structure to another location and instead add the .git file that points to that location. For instance. if you have git-test-wt and git-test-repo saved side by side on your disk, create a git-test-wt/.git file with the following contents:
gitdir: ../git-test-repo
source share