Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Question What is the difference between ignore.conf, hidden_changes.conf and cloaked.conf

Discussion in 'Unity Version Control' started by Lekret, Mar 8, 2023.

  1. Lekret

    Lekret

    Joined:
    Sep 10, 2020
    Posts:
    272
    I want to ignore some files/folders across all members of project in a usual Git maner.
    How do I do it?
    ignore.conf changes aren't recognized in Pending Changes.
    hidden_changes.conf and cloaked.conf are recognized, but I don't know when to use them.
    Thanks in advance.
     
  2. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    842
  3. Lekret

    Lekret

    Joined:
    Sep 10, 2020
    Posts:
    272
    Well, I kinda see the difference now, but need clarification.

    hidden_changes.conf is for temporary files like local changes for debug etc. It's probably not what I need.

    cloaked.conf is to prevent big files from download. It doesn't prevent checkins, right? If I delete some generated folder, then checkin deletion, then cloak the folder will it appear in Pending Changes as added? Or should I maybe use hidden_changes.conf for that?

    Am I right that ignore.conf is only for local usage? Because I see it's self ignored by default. Can I remove self-ignore and make it shared across all project members, will it be intended usage or should I use cloaked/hidden_changes somehow for such behaviour?
     
  4. carlosalba1985

    carlosalba1985

    Unity Technologies

    Joined:
    Jul 19, 2021
    Posts:
    842
    It is for hiding the changes on files that are already under source control.


    Yes, this is just to avoid new revisions from the paths you define. If you delete some folder and you don't want to commit changes, you need to use hidden_changes.conf


    ignore.conf is for private files. Files that you want to keep local but commit to the repository.
     
    Lekret likes this.
  5. Wolfram

    Wolfram

    Joined:
    Feb 16, 2010
    Posts:
    253
    To ensure that ignore.conf is recognized, add this as its first line:

    !ignore.conf


    In addition, even if a file is ignored, you can always explicitly add it to version control if you right-click on it in the Workspace Explorer and select "Checkout". It will then appear in Pending Changes as "Added".

    hidden_changes is for files that need to be in the repository (due to some initial configuration, for example), but which may get changed locally often, and where these changes should not be checked in. For example, we use it for
    /ProjectSettings/ProjectVersion.txt
    , so that the repository knows the "official" Unity version you're supposed to open the project with, but the file will change if you open the project with another Unity version - which happens all the time if team members are using different patch versions (say, 2021.3.16f1 vs. 2021.3.17f1 etc.). Once your "official" Unity version for that project changes, your repo maintainer can explicitly checkin an upddated version of that file, by enabling the "Show hidden files" option in the Pending Changes.

    Note that you can also create a repository named "plastic-global-config", where you can put such config files that should automatically apply to ALL your repositories, without the need to add the same ignore.conf etc. to each repo individually. However, I don't know if this works with the Cloud version, we're using an on-premise repository server.
     
    andreiagmu and Lekret like this.
  6. Lekret

    Lekret

    Joined:
    Sep 10, 2020
    Posts:
    272
    Well, now I understand everything. Thank you all.

    To ignore files completely and prevent their existance in repo (like auto-generated Unity stuff) use ignore.conf and make it shared if you want. Closest analogue for .gitignore.

    To have files in repo and commit them, but prevent download, use cloaked.conf.

    To have files in repo, but to prevent accidental commits (unless you need to) use hidden_changes.conf.