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 How to maintain Version Control after making copy of project?

Discussion in 'Unity Version Control' started by Verne33, Jul 11, 2023.

  1. Verne33

    Verne33

    Joined:
    Apr 12, 2020
    Posts:
    30
    Have an issue I should've sorted earlier, but here we are.

    I made a manual backup/copy of my project when I upgraded to 2022, and started using the copied folder as the new project folder.

    Version Control to my surprise kept working seamlessly with the new copy/version, so I simply kept checking in my changes.

    Now I'm on a different PC, and want to get that newer version onto it. Hoped it would be simple, but Unity Hub in "Open Remote Project" only shows the project up until the point where I switched versions/made the copy. I'm not seeing the changes since I made the "switch".

    Can anyone tell me where all that work is, in Version Control? And is there a recommended way to do this? I know it's a edge case, but I think VC should have issued a warning if this was going to mess things up. (thankfully I additional project backups, but still would be good to know) Thanks!
     
  2. Rafafor_unity

    Rafafor_unity

    Unity Technologies

    Joined:
    Aug 12, 2021
    Posts:
    30
    Hi,

    After making the copy did you open that folder and remove the previous project from the Unity Hub?

    Are you using the standalone cliente or the Unity plugin?

    If you did not use the standalone to create a different workspace for the repository it is possible you did not check-in your changes in the copy but the ones on the previous folder.

    You can check the path in the Unity editor to which version control is pointing at in the right bottom corner something like repositoryname@orgname@cloud and verify that it is the same repo as the one you are trying to open from the different PC.

    Regards,

    Rafael
    Unity Version Control Support
    Virtualize your Workspace. Make it dynamic.
     
  3. Verne33

    Verne33

    Joined:
    Apr 12, 2020
    Posts:
    30
    Thanks for your reply.

    I opened the new folder, but did not remove the old one from Unity Hub.

    Unity plugin, not standalone.

    I checked, and both projects are indeed pointing to the same workspace.

    Is the remedy then to use the standalone client and create a brand new workspace for the copy/new proj?
    How can I "remove/prevent" the copy/new proj from looking at the old folder in the Version Control tab in Unity? That was the origin of this problem - guessing there is some data file somewhere telling my copy proj to point at the older folder path?
     
  4. Rafafor_unity

    Rafafor_unity

    Unity Technologies

    Joined:
    Aug 12, 2021
    Posts:
    30
    Hi,

    The metadata that contains the information from the workspace is located at the root folder, it's hidden by default and it's called .plastic. Removing this folder you will unlink the workspace from UVCS.

    The Unity Hub should be also checking for this folder at least to inform you if its from a remote origin.

    After the unlink you can link back using either the plugin or the client.

    Regards,

    Rafael
    Unity Version Control Support
    Virtualize your Workspace. Make it dynamic.
     
    Verne33 likes this.