문제

I'm using the standard Visual Studio .gitignore at https://github.com/github/gitignore/blob/master/VisualStudio.gitignore

Part of that gitignore is to ignore the bin folders, but this is a problem, because I need to include bin/*.refresh files for visual studio web site projects.

When one has a (local file) web site project in: C:\Projects\MyprojectA\MyProjectWeb then any references to libraries are stored as "hint files" in the C:\Projects\MyprojectA\MyprojectWeb\bin folder as *.refresh.

So if you reference (a non framework DLL) AjaxControlToolkit.dll, so in the bin folder, you end up with AjaxControlToolkit.dll and AjaxControlToolkit.dll.refresh. The content of the file indicates the path of where to find that DLL. (Let's ignore the potential pathing problems when the repo is cloned, because we're checking in the DLLs into a _lib folder that's also checked into the repo)

How does one "unignore" the *.refresh files found within Visual Studio Web Site project bin folders so that they are included with clones of the repo?

도움이 되었습니까?

해결책

Use the exclamation mark.

**/[Bb]in/*
!**/[Bb]in/*.refresh

다른 팁

How about using this VS feature?:

VS screenshot

Once folders are excluded they can't be un-excluded. Do it this way to include sub-folders like roslyn.

replace

[Bb]in/

with

**/[Bb]in/**/*.*
!**/[Bb]in/**/*.refresh

Tiny expansion to Alex' answer, the 'Add Ignored File' button might be hidden under the 'Git' submenu.

'Add Ignored File to Source Control' button

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top