Can not ignore temp word and excel files

Hi,

we need to ignore any temp files of excel, word, etc. in our VSC as it hinders our workflows.

However I have not been able to exclude them via the ignore conf.
Any Idea what I am doing wrong?

I used the logic based on this thread:

Here is our ignore conf. It is located in the root of the project (parent folder of “assets”) and all other definitions in there do work.

Library
library
Temp
temp
Obj
obj
Build
build
Builds
builds
UserSettings
usersettings
MemoryCaptures
memorycaptures
Logs
logs
**/Assets/AssetStoreTools
**/assets/assetstoretools
/Assets/Plugins/PlasticSCM*
/assets/plugins/PlasticSCM*
*.private
*.private.meta
^*.private.[0-9]+$
^*.private.[0-9]+.meta$
.vs
.vscode
.idea
.gradle
ExportedObj
.consulo
*.csproj
*.unityproj
*.sln
*.suo
*.tmp
*.user
*.userprefs
*.pidb
*.booproj
*.svd
*.pdb
*.mdb
*.opendb
*.VC.db
*.pidb.meta
*.pdb.meta
*.mdb.meta
sysinfo.txt
crashlytics-build.properties
*.apk
*.aab
*.app
*.unitypackage
~UnityDirMonSyncFile~*
**/Assets/AddressableAssetsData/*/*.bin*
**/assets/addressableassetsdata/*/*.bin*
**/Assets/StreamingAssets/aa.meta
**/assets/streamingassets/*/aa/*
.DS_Store*
Thumbs.db
Desktop.ini

#ETD Exclusive
99_Private/**
**/Private/**
#Exclude Bakery Temp scene that is used for baking
Assets/99_Plugins/Bakery/_tempScene/**
#ETD Exclusive
99_Private/**
**/Private/**
#Exclude Bakery Temp scene that is used for baking
Assets/99_Plugins/Bakery/_tempScene/**
#Ignore Excel and Word temporary files at any directory level
*/~$*.xls*
*/~$*.doc*
*/~$*.xlsm
*/~$*.xlsx
*/~$*.docx




Why are you putting those under version control in the first place?

Better option would be to use the Office 365 suite so that you can work with these documents in the cloud and even edit them simultaneously rather than just one user being able to edit them (merging Office documents will almost certainly lead to catastrophic failure).

Rule of thumb: If you don’t need specific files in order to work with and build your project, they don’t belong in source control. Or at least not within the same repository as the project.

If you need these files as part of your project, consider if the original files have to be versioned. This may be a case similar to 3D models where the .max files for instance are stored elsewhere, only the exported .fbx go into the Assets folder. Likewise for Office, save .xlsx anywhere but export as .csv into the project. Both tasks can be easily automated.

I know you can read xlsx directly even at runtime but this involves heavy libraries and isn’t nearly as cross-platform as Unity nor is it anywhere near as efficient as reading a CSV or other format.

My best guess is that the ~ or $ characters may need to be escaped because they may carry special meaning. You could test this by omitting one or the other, and then you could try for instance \$.

Otherwise see if you can find the specifications for the ignore file in the manual.

If the files are already under version control, you need to use the “hidden_changes.conf”.
If the files are not under source control, so you keep them just locally in your machine, you need to use “ignore.conf”.

…You are a smart man :smiley:
Thank you for the tip and feedback!

We’ve adjusted our workflow and now have just a scriptable object in the project holding a URL to the office link. It is much more flexible and stable. I recommend everyone who is looking into this to consider doing so as well.

1 Like