2015-05-02 86 views
1

我正在使用Visual Studio Online Visual Studio 2013上的GIT存储库,出于某种原因,我的项目bin,obj目录和其他Dll和Pdbs在更改跟踪中不会被忽略。visual studio 2013 GIT忽略列表不会忽略dlls

这是我的.gitignore文件,我试着在网上找到的所有建议,比如添加.tfignore和其他东西,没有什么帮助。

# Download this file using PowerShell v3 under Windows with the following comand 
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore 

# User-specific files 
*.suo 
*.user 
*.sln.docstates 

# Build results 

[Dd]ebug/ 
[Rr]elease/ 
x64/ 
build/ 
[Bb]in/ 
[Oo]bj/ 

# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets 
!packages/*/build/ 

# MSTest test Results 
[Tt]est[Rr]esult*/ 
[Bb]uild[Ll]og.* 

*_i.c 
*_p.c 
*.ilk 
*.meta 
*.obj 
*.pch 
*.dll 
*.pdb 
*.pgc 
*.pgd 
*.rsp 
*.sbr 
*.tlb 
*.tli 
*.tlh 
*.tmp 
*.tmp_proj 
*.log 
*.vspscc 
*.vssscc 
.builds 
*.pidb 
*.log 
*.scc 

# OS generated files # 
.DS_Store* 
ehthumbs.db 
Icon? 
Thumbs.db 

# Visual C++ cache files 
ipch/ 
*.aps 
*.ncb 
*.opensdf 
*.sdf 
*.cachefile 

# Visual Studio profiler 
*.psess 
*.vsp 
*.vspx 

# Guidance Automation Toolkit 
*.gpState 

# ReSharper is a .NET coding add-in 
_ReSharper*/ 
*.[Rr]e[Ss]harper 

# TeamCity is a build add-in 
_TeamCity* 

# DotCover is a Code Coverage Tool 
*.dotCover 

# NCrunch 
*.ncrunch* 
.*crunch*.local.xml 

# Installshield output folder 
[Ee]xpress/ 

# DocProject is a documentation generator add-in 
DocProject/buildhelp/ 
DocProject/Help/*.HxT 
DocProject/Help/*.HxC 
DocProject/Help/*.hhc 
DocProject/Help/*.hhk 
DocProject/Help/*.hhp 
DocProject/Help/Html2 
DocProject/Help/html 

# Click-Once directory 
publish/ 

# Publish Web Output 
*.Publish.xml 

# NuGet Packages Directory 
## TODO: If you have NuGet Package Restore enabled, uncomment the next line 
#packages/ 

# Windows Azure Build Output 
csx 
*.build.csdef 

# Windows Store app package directory 
AppPackages/ 

# Others 
sql/ 
*.Cache 
ClientBin/ 
[Ss]tyle[Cc]op.* 
~$* 
*~ 
*.dbmdl 
*.[Pp]ublish.xml 
*.pfx 
*.publishsettings 
modulesbin/ 
tempbin/ 

# EPiServer Site file (VPP) 
AppData/ 

# RIA/Silverlight projects 
Generated_Code/ 

# Backup & report files from converting an old project file to a newer 
# Visual Studio version. Backup files are not needed, because we have git ;-) 
_UpgradeReport_Files/ 
Backup*/ 
UpgradeLog*.XML 
UpgradeLog*.htm 

# vim 
*.txt~ 
*.swp 
*.swo 

# svn 
.svn 

# SQL Server files 
**/App_Data/*.mdf 
**/App_Data/*.ldf 
**/App_Data/*.sdf 


#LightSwitch generated files 
GeneratedArtifacts/ 
_Pvt_Extensions/ 
ModelManifest.xml 

# ========================= 
# Windows detritus 
# ========================= 

# Windows image file caches 
Thumbs.db 
ehthumbs.db 

# Folder config file 
Desktop.ini 

# Recycle Bin used on file shares 
$RECYCLE.BIN/ 

# Mac desktop service store files 
.DS_Store 

# SASS Compiler cache 
.sass-cache 

# Visual Studio 2014 CTP 
**/*.sln.ide 
*.dll 
*.pdb 

在忽略列表中最后一节,有助于忽略未跟踪变化DLL和PDBS,但不包括在变化和排除变化

# Visual Studio 2014 CTP 
    **/*.sln.ide 
    *.dll 
    *.pdb 
+0

你已经检查过了吗? '.gitignore'仅适用于不在存储库中的新文件。 –

+0

@EdwardThomson是的。我碰巧检查一次。我将如何删除它? – HaBo

回答

1

添加** /对DLL目录,因为任何文件夹(而不仅仅是根目录)中搜索他们:

**/* DLL
**/* PDB

删除。使用“git rm file”(或“git rm -rf文件夹”来删除整个bin文件夹)的当前文件。

+0

我试图在Git Bash“git rm -rf OneProjectFolderName/bin”中运行它,它给出了一个致命错误:pathspec'OneProjectFolderName/bin'与任何文件都不匹配 – HaBo

+0

已更新gist https://gist.github.com/kmorcinek/2710267忽略nuget包。 –