.gitignore NuGet exclude packages/ include packages/repositories.config

前端 未结 5 1663
离开以前
离开以前 2021-01-30 00:25

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

\\packages/*
!packages/repositories.config
5条回答
  •  隐瞒了意图╮
    2021-01-30 01:28

    I found this simple pattern works.

    /packages/*/
    

    It should ignore all directories in the root packages directory, but include all files there. Not sure what other files than repositories.config might appear in there or whether they should be included in the repository.

    See also .gitignore Syntax: bin vs bin/ vs. bin/* vs. bin/**

提交回复
热议问题