-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitignore
383 lines (303 loc) · 7.02 KB
/
.gitignore
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
Skip to content
Search¡
All gists
Back to GitHub
@futurename
@kmorcinek kmorcinek/.gitignore
Last active 4 days ago ? Report abuse
168
50
Code Revisions 28 Stars 168 Forks 50
<script src="https://gist.github.com/kmorcinek/2710267.js"></script>
Example .gitignore file I use for C# projects
.gitignore
# The following command works for downloading when using Git for Windows:
# curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
#
# Download this file using PowerShell v3 under Windows with the following comand:
# Invoke-WebRequest https://gist.githubusercontent.com/kmorcinek/2710267/raw/ -OutFile .gitignore
#
# or wget:
# wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
[Bb]in/
[Oo]bj/
# build folder is nowadays used for build scripts and should not be ignored
#build/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.log
*.scc
# OS generated files #
.DS_Store*
Icon?
# 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
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
*.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
# Temp files when opening LibreOffice on ubuntu
.~lock.*
# svn
.svn
# CVS - Source Control
**/CVS/
# Remainings from resolving conflicts in Source Control
*.orig
# 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
# Visual Studio temp something
.vs/
# dotnet stuff
project.lock.json
# VS 2015+
*.vc.vc.opendb
*.vc.db
# Rider
.idea/
# Visual Studio Code
.vscode/
# Output folder used by Webpack or other FE stuff
**/node_modules/*
**/wwwroot/*
# SpecFlow specific
*.feature.cs
*.feature.xlsx.*
*.Specs_*.html
#####
# End of core ignore list, below put you custom 'per project' settings (patterns or path)
#####
@czeigler
czeigler commented on May 23, 2016
Very handy, thanks! You can also get it with wget:
wget --no-check-certificate http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
@kmorcinek
Owner
Author
kmorcinek commented on Aug 28, 2016
Thx @czeigler, updated
@tejpratapsingh
tejpratapsingh commented on Sep 29, 2016
Doesn't ignore bin and obj folders:
I am on VS 2015 Update 3.
@swapnildaga17
swapnildaga17 commented on Feb 27, 2017
I know this is late. but might help someone
@tejpratapsingh
If you have already added the bin and obj folders in git. you will have to remove them since git ignore does not work on files already in git
use command
git rm -r --cached <path to bin, obj folders>
git commit -m "untracking bin and obj"
now the gitignore works on bin and obj
@amlconsulting
amlconsulting commented on Aug 24, 2017
@swapnildaga17, thanks for the tip. That worked for me.
@kaburkett
kaburkett commented on Oct 10, 2017
thanks bro
@thiennhank9
thiennhank9 commented on Oct 25, 2017
Very nice, thanks bro :D. I used it in my C# project.
@yonatangross
yonatangross commented on Jan 6, 2018
thank you.
@abhishektayade
abhishektayade commented on Feb 20, 2018
Thank you! That rm command worked for me
@asantana48
asantana48 commented on Mar 7, 2018 ?
Awesome
@roninJosue
roninJosue commented on Mar 10, 2018
Hello very nice, its work super, thanks :)
@Mochoa92
Mochoa92 commented on May 24, 2018
Nice, Thanks a lot !
@dllmr
dllmr commented on Jul 6, 2018
This is really helpful - thank you!
@ThijsJung
ThijsJung commented on Aug 25, 2018
This helped me a lot, thanks for sharing!
@kevinnz2020
kevinnz2020 commented on Sep 6, 2018
Thanks a lot!
@kykzk46
kykzk46 commented on Sep 14, 2018
Cheers!
@joshuaguenther
joshuaguenther commented on Sep 19, 2018 ?
Super helpful, thank you!
@Genebi
Genebi commented on Jan 12, 2019
How to unignore a specific file inside Debug folder?
@vishwasgupta
vishwasgupta commented on Feb 9, 2019
I have checked in all the files bin , suo etc on git. Now each time when I build the solution my dll got updated and git desktop suggest me to checked in those changes. I don't want to checked those (.dll and .pdb files). Can anyone help me here?
@Grauldon
Grauldon commented on Apr 20, 2019
@Genebi Use the ! (Not) operator.
!path/filename
@Grauldon
Grauldon commented on Apr 20, 2019 ?
@kmorcinek The following commands also work for downloading when using Git for Windows:
curl -LOf http://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
curl -Of https://gist.githubusercontent.com/kmorcinek/2710267/raw/.gitignore
@kmorcinek
Owner
Author
kmorcinek commented on Apr 21, 2019 ?
@Grauldon thx, done. (added)
@kmorcinek
Owner
Author
kmorcinek commented on Apr 21, 2019 ?
@vishwasgupta you need to delete them all and then make a commit that deletes them.
@kmorcinek
Owner
Author
kmorcinek commented on Apr 21, 2019
@Genebi you can also add one file explicit, like:
git add -f my/ignore/file.foo
https://stackoverflow.com/questions/8006393/force-add-despite-the-gitignore-file/8006450#8006450
@thamhphanaugensoftwaregroupcom
thamhphanaugensoftwaregroupcom commented on Jun 17, 2019
Thank @swapnildaga17
@futurename
Leave a comment
Attach files by dragging & dropping, selecting or pasting them.
? 2020 GitHub, Inc.
Terms
Privacy
Security
Status
Help
Contact GitHub
Pricing
API
Training
Blog
About