git –git-dir not working as expected

You have to define the working dir as well. Confusing I know but it’s a flexibility thing.

git --git-dir=/mycode/.git --work-tree=/mycode status

You can read a little more here

Leave a Comment