Understanding Source Control

I have used SC in the past but never set it up and managed it myself.
I’ve made a test project to mess with and get a better understanding…

I have a folder and sub folders that I did not set to ignore at the outset but, I don’t want this in my Repo. They were checked in previously, and now say “Controlled” in the Workspace Explorer. The option to add them to my Ignore list is greyed out.

Is there a way to remove them from being controlled now? Is this what Cloaked/Hidden is for?

If I deleted them, from with in the Workspace Explorer, that would remove them from my local directory structure right? As if I had just gone and done so in explorer?

Thanks!

  • Stefan

You can delete them from the workspace explorer and have the option not to delete the files. They’re then back to private and you can right click and set them on ignore list.

Don’t forget to add the meta file of your folder to the ignore list.

I agree this is a common scenario, especially for beginners and the solution should be a lot simplier. Having grey out options without any solution is terrible UX.

1 Like

You cannot add to the ignore list controlled files, but you can add the controlled files to the hidden changes list.

Yes but it’s not the same feature.

The issue here is that Unity take the initiative to add files to the controlled list by default. So by the time you can right_click/Add_to_ignore_list, it’s already too late and you need to delete them from version control.

This is a UX dead end and that shouldn’t exist.

If the files were only added and never committed, users should be able to add them on the ignore list anyways.

If the files already have a history, users should get a warning asking if they want to delete them from version control, only keep them on local storage and understand the implications.

3 Likes

Very good point! There is no reason to not allow this.

1 Like

I will run some tests and I will share this feedback with the team.

Once the files are already added to source control, they can still be added to the hidden changes list but the ignore list only works with private items. I think having separate lists for ignoring the changes for controlled / not controlled items shouldn’t be a problem.

But I properly understand the main problem is Unity is adding to source control some items by default and you would like to avoid this.

2 Likes

There is no need to keep or create a separate list. All that is necessary is a convenience function in the Client/Plugin that automatically undoes an “Add to source control” when trying to put a Pending Changes item with the “Added” state (as opposed to “Controlled”) on the ignore list, therefore combining “Undo” and “Add to ignore” for such items.

Items that have already been checked in should continue to not be allowed to put on ignore, no reason to change this behaviour.

1 Like

What are the file types/paths that Unity is automatically adding to source control? Maybe we are missing them in the default ignore list and we can also change this.

To my knowledge, anything added in Unity. This might be done by the version control plugin.

Here is an example where I just created a new script and a new folder in Unity and they’ve both been automatically added, meaning I never had a chance to add them in the ignore.conf.

It is especially inconvenient when you create a folder for the sole purpose of containing ignored files. There is no obvious way to solve that for a beginner.

8945688--1227576--2023-04-13 13_10_53-.png

1 Like

Sorry, I meant the Unity plugin. I was guessing that you wanted to ignore some specific file types and we could add them to the default ignore list in the Unity plugin. But it doesn’t seem like your scenario.

We have shared this feedback with the product team and we have created a task to improve this workflow where the items are automatically added to source control but you would like to add them to the ignore list.

3 Likes