I found a peculiar behavior with git, and I can reproduce it every time on my machine.
If I have two local repositories, one bare inside the folder express.git, and the other non-bare with a working tree inside the folder express, both in the same parent folder, I can do the command git pull ../express.git from inside the express folder. This automatically updates everything inside express.
However, if I run the command git --git-dir /home/cisw470p/stu006/express/.git pull /home/cisw470p/stu006/express.git master from a location no located in either git repository, then the express repo will pull changes, but won't automatically update the working tree. I then have to run git add . to add all changes and then make another commit from inside express and now everything is good.
Why doesn't the long version of the command using the --git-dir option not automatically update the working tree for express? Is there a reason for this, or did I find a bug?
EDIT: I just tried it again but edited a different file and now it worked. I'm completely lost.
--work-tree=...arg?expressis the work tree along with the.gitfolder, like a normal repo.gitan explicit git-dir, why are you expecting it to just assume the parent of the git dir is a work tree? That could be a rather dangerous assumption in many cases (notably, if the git dir is actually a bare repo)--git-diror--work-treeflags. They're mostly only useful when writing esoteric scripts that need to reach in and poke at other repositories. When using these sorts of options, you need to specify everything because you're explicitly telling git not to follow its default heuristics to detect them.