visual-studio - 将 Visual Studio 与 Git 结合使用时要忽略的文件

标签 visual-studio git version-control development-environment

我已经安装了 Git 以使用 Visual Studio 2008 进行一些开发。大部分工作将是新的开发,但我们确实有一些 VS2005 之前的旧项目,我想将它们带到新的存储库中。有一个关于一般 VS/Git integration 的现有线程但我的问题仅限于 .gitignore 文件和 Visual Studio。

我的问题分为两部分:

  • .gitignore 文件中应包含哪些条目以涵盖 Visual Studio 特定文件,如二进制文件、程序集、调试文件等?上面提到的线程中涵盖了一些内容,但是是否有完整的集合?

  • 在什么情况下您需要全局排除文件,或针对单个存储库,或使用环境变量?

我已经知道怎么做了。这是 Git user-manual 的摘录关于忽略文件。

If you wish the exclude patterns to affect only certain repositories (instead of every repository for a given project), you may instead put them in a file in your repository named .git/info/exclude, or in any file specified by the core.excludesfile configuration variable. Some git commands can also take exclude patterns directly on the command line. See gitignore(5) for the details.

最佳答案

关于visual-studio - 将 Visual Studio 与 Git 结合使用时要忽略的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1677113/

相关文章:

Git: pull 一个重新设置的分支

git - 来自特定分支的 TFS 条件 pull 请求

git - git checkouts 到底是什么意思?

svn - 使用 TortoiseSVN 删除修订版本

git - 将远程存储库作为具有完整历史记录的子目录导入

c# - 在 Visual Studio 中解决 DisconnectedContext

visual-studio - 创建包含共享项目属性的 nuget - 自动引用

visual-studio - cmake:add_custom_command 仅在第一次调用

version-control - Windows 上的 RCS - rcsmerge 总是失败

sql-server - SSDT、SSDT-BI 在不同 SQL 版本的向后兼容性方面的混淆