-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitignore
395 lines (314 loc) · 6.98 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
384
385
386
387
388
389
390
391
392
393
394
Skip to content
Search…
All gists
Back to GitHub
@kporonko
@kmorcinek
kmorcinek/.gitignore
Last active 7 days ago • Report abuse
249
66
Code
Revisions
29
Stars
249
Forks
66
<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
*.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)
#####
Load earlier comments...
@amlconsulting
amlconsulting commented on 24 Aug 2017
@swapnildaga17, thanks for the tip. That worked for me.
@kaburkett
kaburkett commented on 10 Oct 2017
thanks bro
@thiennhank9
thiennhank9 commented on 25 Oct 2017
Very nice, thanks bro :D. I used it in my C# project.
@yonatangross
yonatangross commented on 6 Jan 2018
thank you.
@abhishektayade
abhishektayade commented on 20 Feb 2018
Thank you! That rm command worked for me
@asantana48
asantana48 commented on 7 Mar 2018 •
Awesome
@roninJosue
roninJosue commented on 10 Mar 2018
Hello very nice, its work super, thanks :)
@Mochoa92
Mochoa92 commented on 24 May 2018
Nice, Thanks a lot !
@dllmr
dllmr commented on 6 Jul 2018
This is really helpful - thank you!
@ThijsJung
ThijsJung commented on 25 Aug 2018
This helped me a lot, thanks for sharing!
@kevinnz2020
kevinnz2020 commented on 7 Sep 2018
Thanks a lot!
@mwck46
mwck46 commented on 15 Sep 2018
Cheers!
@joshuaguenther
joshuaguenther commented on 19 Sep 2018 •
Super helpful, thank you!
@Genebi
Genebi commented on 12 Jan 2019
How to unignore a specific file inside Debug folder?
@vishwasgupta
vishwasgupta commented on 9 Feb 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 20 Apr 2019
@Genebi Use the ! (Not) operator.
!path/filename
@Grauldon
Grauldon commented on 20 Apr 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
Author
kmorcinek commented on 21 Apr 2019 •
@Grauldon thx, done. (added)
@kmorcinek
Author
kmorcinek commented on 21 Apr 2019 •
@vishwasgupta you need to delete them all and then make a commit that deletes them.
@kmorcinek
Author
kmorcinek commented on 21 Apr 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 17 Jun 2019
Thank @swapnildaga17
@teamzz111
teamzz111 commented on 16 Aug 2020
usefull! thanks
@cesar-programmer
cesar-programmer commented on 22 Dec 2020
Thanks this is so usefull
@LassazVegaz
LassazVegaz commented on 24 Dec 2020
Thanks
@nMouginot
nMouginot commented on 20 Apr 2021
Thanks a lot for the sharing ! GitHub should add your gitIgnore in ".gitignore template". They currently have nothing for C# projects ! :'(
@veronicapc92
veronicapc92 commented on 24 Apr 2021
thank you!!
@JK2Kgit
JK2Kgit commented on 9 Nov 2021
there is *.log duplcated in line 53 and 58
@kmorcinek
Author
kmorcinek commented on 25 Feb
@JK2Kgit thx, fixed.
@stettdev
stettdev commented on 15 Mar
Helpful. Thank you :)
@Victor23HD
Victor23HD commented 24 days ago
Thanks my friend.
@kporonko
Leave a comment
Файл не выбран
Attach files by dragging & dropping, selecting or pasting them.
© 2022 GitHub, Inc.
Terms
Privacy
Security
Status
Docs
Contact GitHub
Pricing
API
Training
Blog
About