.gitignore NuGet排除软件包/包括软件包/repositories.config [英] .gitignore NuGet exclude packages/ include packages/repositories.config

查看:74
本文介绍了.gitignore NuGet排除软件包/包括软件包/repositories.config的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为使用NuGet的Visual Studio项目创建.gitignore.当前包含:

I'm trying to create a .gitignore for a Visual Studio project that uses NuGet. It currently contains:

\packages/*
!packages/repositories.config

这不会忽略文件夹中的任何内容.一切都会上演.我也尝试过:

This does not ignore anything in the folder. Everything gets staged on an add. I have also tried:

packages/
!packages/repositories.config

这将忽略packages文件夹中的所有内容,并且不包括packages/repositories.config.

This ignores everything in the packages folder and does not include the packages/repositories.config.

我在做什么错了?

推荐答案

/packages/
!packages/repositories.config

您还可以在packages文件夹中添加.gitignore:

You can also add a .gitignore in the packages folder:

*
!repositories.config
!.gitignore

这篇关于.gitignore NuGet排除软件包/包括软件包/repositories.config的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆