In my case it was the plugin qlcolorcode that was failing, thus prevent the preview to work.
You can if you have the same problem with the following command:
qlmanage -d4 -p '/path/of/your/file.txt'
You may see the culprit:
[DEBUG] Thumbnailing file:///path/of/your/.txt - type: public.plain-text - generator: <QLGenerator /Users/gomino/Library/...
It's all about syntax sometimes :-)
git config --global core.editor 'xed -w'
Not sure whether you really want to wait for Xcode to launch each time you git commit something. Maybe vi or nano are the better options here.
I would never want to do what you want, I think it's a horrible idea, but I tried to, and I succeeded!
What did I do? Easy:
Open Xcode and remove the splash window from the boot (in case it could create some mayhem).
Find Xcode: well, it's hard to explain how, but I found it at /Applications/Xcode.app/Contents/MacOS/Xcode.
Repeat your mistake:
$ git ...