I\'m sorry if this is a duplicate, I\'ve searched google and SO and couldn\'t find anything similar since it\'s a fairly generic set of words to search for!
What I w
I'm not really sure if this is a good advice, but you can set the GIT_DIR environment variable to point to a non-bare git directory. Beware that in this setup git is not able to find the top work directory, so you must be sure to be in the correct directory when you issuing git commands.
mkdir foobar
cd foobar
git init
export GIT_DIR=$PWD/.git
cd ..
mkdir wc
cd wc
echo foo > bar.txt
git add .
git commit