Symptoms:
- I want to avoid submitting certain files to the server.
- I want to ignore files.
- I want to use a .gitignore.
Cause:
In some cases, you may want to avoid submitting files to a server to avoid consuming storage for things that you don't really need to store, like build results.
Resolution:
What you need to do in these cases is to use the ignore.conf. It allows you to select which files or folders you don't want to upload and prevent them from appearing in the "Pending Changes" view or in the output of the "cm status" command. That way, you can avoid submitting them by mistake.
To do so, you can either modify the ignore.conf file directly, or add the entries from the workspace explorer:
- Go to the workspace explorer view.
- Right-click on the file you want to ignore.
- Select the option "add to ignored list".
- Select whether you want to ignore any file with that name, all the files with the extension, or that particular file.
- Select "Ok".
Keep in mind that this only works for private files; if a file has already been uploaded to the server, then the ignore.conf will have no effect on it.
You can find a Unity ignore.conf example here: