使用 Visual Studio 2010 和 HG 进行版本控制

发布于 2024-10-03 03:54:03 字数 288 浏览 1 评论 0原文

最近,我和我的团队获得了一个用于版本控制的 HG 存储库,因为这将使我们的应用程序的开发变得更容易、更好。

我们正在使用 Visual Studio 2010 和 c#

所有项目都在版本控制之下。

不幸的是,当我们其中一个人提交时,通常另一个人在打开解决方案时会遇到某种错误(由于 VS 有各种文件)

我的问题是:哪些文件应该置于版本控制之下? (在我的例子中被删除了!)

PS:我们有 3 个项目:(使用 XNA)游戏、内容、测试

非常感谢!

Recently me and my team got a HG repository for versioning as this would make it easier and better to develop our application.

We are using Visual Studio 2010 and c#

All of the project is under version control..

Unfortunately, when one of us commits, usually the other gets an error of some kind when opening the solution (due to the various files VS has)

My question is: what files should be put under version control? (and removed in my case!)

PS: we have 3 Projects: (using XNA) game, contents, test

Thank you very much!!!

Dan

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

沉鱼一梦 2024-10-10 03:54:03

至少您在 .hgignore 中需要这些:

syntax: glob
bin
obj
*.sln.cache
*.suo
*.user

根据需要添加。但不要过度忽视,因为这样可能会丢失数据。例如,@Darin 的回答会导致您停止跟踪私钥文件(.snk)。

At least you need these in your .hgignore:

syntax: glob
bin
obj
*.sln.cache
*.suo
*.user

Add as needed. But don't overignore as you can lose data that way. For instace @Darin's answer causes you to stop tracking of private key files (.snk).

如梦 2024-10-10 03:54:03

我在下面使用它,它来自 Rob Conery 的 Mercurial 教程 (http://tekpub.com/view/hg/1 & http://tekpub.com/codeplex)位于 tekpub。它位于 git 存储库中,最初适用于 VS 2K8,但适用于 2K10。 http://gist.github.com/314082

语法:glob

*.obj 
*.exe 
*.pdb 
*.user 
*.aps 
*.pch 
*.vspscc 
*_i.c 
*_p.c 
*.ncb 
*.suo 
*.tlb 
*.tlh 
*.bak 
*.cache 
*.ilk 
*.log 
*.lib 
*.sbr 
*.scc 
[Bb]in 
[Dd]ebug*/ 
obj/ 
[Rr]elease*/ 
_ReSharper*/ 
[Tt]est[Rr]esult* 
[Bb]uild[Ll]og.* 
*.[Pp]ublish.xml 

I use below and it came from Rob Conery on his tutorials for mercurial (http://tekpub.com/view/hg/1 & http://tekpub.com/codeplex) at tekpub. It's on a git repo and was originally for VS 2K8 but works just fine for 2K10. http://gist.github.com/314082

syntax: glob

*.obj 
*.exe 
*.pdb 
*.user 
*.aps 
*.pch 
*.vspscc 
*_i.c 
*_p.c 
*.ncb 
*.suo 
*.tlb 
*.tlh 
*.bak 
*.cache 
*.ilk 
*.log 
*.lib 
*.sbr 
*.scc 
[Bb]in 
[Dd]ebug*/ 
obj/ 
[Rr]elease*/ 
_ReSharper*/ 
[Tt]est[Rr]esult* 
[Bb]uild[Ll]og.* 
*.[Pp]ublish.xml 
夜吻♂芭芘 2024-10-10 03:54:03

以下是我从版本控制中排除的文件和目录的列表(在目录的情况下,我递归地排除该目录中的所有内容):

bin/
obj/
TestResults/
*.vspscc
*.user
*.snk
*.suo
*.vssscc
*.gpState
Debug/
Release/

Here's a list of files and directories I exclude from version control in the case of directory I exclude recursively everything from this directory):

bin/
obj/
TestResults/
*.vspscc
*.user
*.snk
*.suo
*.vssscc
*.gpState
Debug/
Release/
墨洒年华 2024-10-10 03:54:03

这里还有一些:

*.ncb
*.sdf
*.ilk
*.aps
*.resharper
_ReSharper*
*.Cache

Here are a few more:

*.ncb
*.sdf
*.ilk
*.aps
*.resharper
_ReSharper*
*.Cache
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文