Reputation: 1
I am using Visual Studio 2010 and
I noticed when I published my project that all the files in the published directory were also under source control which I don't want. When I looked at one of my other projects under source control I noticed it didn't have the .hg folder
and publishes without issue. I then removed the .hg folder
and I was able to build and publish and the files were no longer under source control BUT now my project isn't either.
I put back the .hg folder
and I'm back where I started. How do I remove the .hg folder from my project but still retain source control?
Upvotes: 0
Views: 410
Reputation: 1122342
The .hg
directory cannot be removed. It contains everything Mercurial knows about your project. Deleting that directory effectively removes all source control.
Add files you don't want to be tracked to the .hgignore
file in the root of your repository instead. See the hgignore
documentation for the format of this file.
Upvotes: 3