I am using Hg for my development. Recently, I upgraded to Lion and Xcode 4.2 and I have created a Xcode project in my source tree. The Xcode by default uses Git and created .git folder in the project folder.
Being able to do versioning in Xcode is a plus but it is sort of redundant with both Git and Hg.
The problem is, should I check in the .git (folder and files) in the Xcode project folder or not? Or should I just switch off Git in Xcode and delete .git folder?
The second. Versioning version data doesn't make much sense, unless you want to track the state of the entire git repository in your mercurial repository. Even worse, if you also add the .hg to the git repo, both repositories will try to track each other; once you commit to hg, git will see a difference, which you should then commit, and then hg in turn sees a new difference, and so on, indefinitely.
In other words, it doesn't make sense to put the version control directory under version control. Either roll with only git, or with only mercurial. If you really want to, you can use git to interface with mercurial repositories, and vv (AFAIK both can read each other's data structures), and you can even use them alongside each other, but that would be kind of redundant and pointless.
.git is the folder that has the git repo of XCode. If you want to keep both your Hg and git repos in sync you can use something like
When having projects in both git and hg repositories, clone your projects from both repositories into different work copy folder. If you preferred, use hg-git to check out git repository using hg.
In my case, I use SourceTree, a GUI client, that supports both git and hg so I don't have to deal with the complexity of setting up hg-git.