.gitignore
对于项目中产生的中间文件、测试文件、可执行文件等,这类不需要被 git 所监控的文件,都可以使用 .gitignore 进行忽略设定。下面以 VS2008 项目为例,设置 .gitignore 文件。
项目目录结构
| README
|
\---MergingData
| .gitignore
| MergingData.sln
|
\---MergingData
| CodeFile1.cs
| favicon.ico
| Form1.cs
| Form1.Designer.cs
| Form1.resx
| MergingData.csproj
| MergingData.csproj.user
| Program.cs
|
+---bin
| +---Debug
| | MergingData.pdb
| | MergingData.vshost.exe
| | MergingData.vshost.exe.manifest
| | MergingData11.exe
| | MergingData12.exe
| | Microsoft.Office.Interop.Excel.dll
| | Microsoft.Vbe.Interop.dll
| | office.dll
| |
| \---Release
| MergingData.exe
| MergingData.pdb
| MergingData.vshost.exe
| MergingData.vshost.exe.manifest
| MergingData12.exe
|
+---obj
| +---Debug
| | | MergingData.csproj.FileListAbsolute.txt
| | | MergingData.csproj.GenerateResource.Cache
| | | MergingData.exe
| | | MergingData.Form1.resources
| | | MergingData.pdb
| | | MergingData.Properties.Resources.resources
| | | ResolveAssemblyReference.cache
| | |
| | +---Refactor
| | \---TempPE
| \---Release
| | MergingData.csproj.FileListAbsolute.txt
| | MergingData.csproj.GenerateResource.Cache
| | MergingData.exe
| | MergingData.Form1.resources
| | MergingData.pdb
| | MergingData.Properties.Resources.resources
| |
| \---TempPE
+---Properties
| AssemblyInfo.cs
| Resources.Designer.cs
| Resources.resx
| Settings.Designer.cs
| Settings.settings
|
\---res
+---inputfile
| 1.xls
| 10.xls
| 2.xls
| 3.xls
| 4.xls
| 5.xls
| 6.xls
| 7.xls
| 8.xls
| 9.xls
|
\---outputfile
1. 忽略某一目录下的所有文件
忽略红色标注的文件
MergingData/bin/
MergingData/obj/