Search code examples
gitignore

A comprehensive git ignore file


Over the years, I have worked in developing programs in C# and Unity and Python and Django and applications for HoloLens and Oculus with IDEs like Visual Studio and Visual Studio Code and also web dev in Angular and TypeScript and JavaScript.

I have gathered everything that I believe should be ignored for any project that involves development in these languages and frameworks, but all in one git ignore without causing issues for each other.

So far, I have the following. I do wonder though if someone might spot something that should not be in here or perhaps redundant:

[Dd]ebug/
[Dd]ebugPublic/
[Bb]uild/
[Bb]uilds/
[Pp]ackage/
[Pp]ackages/
[Rr]elease/
[Rr]eleases/
[Ll]ogs/
[Ll]og/
[Uu]wp/
[Aa]pp/
[Ll]ibrary/
[Tt]emp/
[Oo]bj/
[Bb]in/
[Bb]ackup*/
[Ee]xported[Oo]bj/
3rdParty/
[Tt]hirdParty/
[Aa]ssets/3rdParty/
[Aa]ssets/[Tt]hirdParty/
[Aa]ssets/[Tt]hirdParty.meta
[Aa]ssets/[Pp]lugins*
[Aa]ssets/[Aa]sset[Ss]tore[Tt]ools*
/.vs/
.vscode/
*.bak
._*
~$*
*~
obj/
x64/
x86/
Installer/
App/[pP]layers/
WindowsStoreApp/
HoloSymMDL2*
Assembly-CSharp.csproj
WSATestCertificate.pfx
WSATestCertificate.pfx.meta
UnityVS*
UnityGenerated/
UnityPackageManager/
project.json
project.lock.json
project.fragment.lock.json
/*.csproj
*.csproj
*.booproj
*.unityproj
*.unitypackage
*.log
*.user
*.userprefs
*.userosscache
*.sln.docstates
*.sln
/*.sln
*.suo
*.svd
*.swp
*.tmp
*.tmp_proj
*.opendb
*.pdb
*.pidb
*.pdb.meta
*.pidb.meta
*.apk
*.blend[1-9]
StyleCop*
*.stackdump
sysinfo.txt
.Trash
.Trashes
.DS_Store
.DS_Store?
.Spotlight-V100
$RECYCLE.BIN/
.consulo/
*.coverage
*.coveragexml
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
.JustCode
_TeamCity*
*.dotCover
_NCrunch_*
.*crunch*.local.xml
*.mm.*
AutoTest.Net/
.sass-cache/
[Ee]xpress/
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
*.VisualState.xml
TestResult.xml
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
_Chutzpah*
*.ide/
*.psess
*.vsp
*.vspx
$tf/
*.gpState
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
publish/
*.[Pp]ublish.xml
*.azurePubxml
*.pubxml
*.publishproj
*.nupkg
**/packages/*
!**/packages/build/
csx/
*.build.csdef
AppPackages/
*.cert
*.privkey
*.pfx
*.pfx.meta
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
*.dbmdl
*.dbproj.schemaview
*.publishsettings
node_modules/
Generated_Code/
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
*.mdf
*.ldf
*.rdl.data
*.bim.layout
*.bim_*.settings
FakesAssemblies/
[Ee]hthumbs.db
[Ee]hthumbs.db.meta
[Tt]humbs.db
[Tt]humbs.db.meta
Desktop.ini
*.cab
*.msi
*.msm
*.msp
/node_modules
/.pnp
.pnp.js
/coverage
/build
.env.local
.env.development.local
.env.test.local
.env.production.local
npm-debug.log*
yarn-debug.log*
yarn-error.log*
/[Ll]ibrary/
/[Tt]emp/
/[Oo]bj/
/[Bb]uild/
/[Bb]uilds/
/Assets/AssetStoreTools*
Bin/
Assets/AssetStoreTools*
App/
UWP/
.vs/
ExportedObj/
*.lnk
*.ipch
*.obj
*.tlog
*.idb
Thumbs.db
ehthumbs.db

Solution

  • I do not think it is an interesting idea. Because we may inadvertently ignore some files.

    I prefer to add the file to ‍.gitignore as soon as I feel the need.

    This site also offers an interesting option, for example, you select a framework and you can use the output in your projects. Also, the IDEs themselves have plugins or extensions that can create a .gitignore file for you depending on the project. For example this plugin from IntelliJ or this extension of VS Code

    Feeling your need is valuable.