Let's say I have a single file, foo.txt, that I want to manage with Git, and I don't want to move it into its own directory out of (let's say) /Users/me/Documents, which also has a ton of other files I don't want to include in a repo with foo.txt. Is this possible?
I tried creating a bare repo (so it would not be named .git):
git init --bare .foo.txt
You can do exactly what you want if you run git like this:
git --git-dir=.foo.txt --work-tree=. status
Alias the first part to
git-foo and you're off to the races.