Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

How do I force push to Collaborate?

Discussion in 'Unity Collaborate' started by Stannn_Yang, Jun 2, 2017.

  1. Stannn_Yang

    Stannn_Yang

    Joined:
    May 26, 2017
    Posts:
    2
    Hi. So we are working on a project using collab. Yesterday, I committed a working copy to the collab, but today's morning my teammate committed a broken copy to collab. How do I force push my working copy to the latest version without updating to her version? I couldn't do any push unless I update to her version. Thanks.
     
  2. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @Stannn_Yang! Collab is not designed to let you push changes until you have grabbed the latest changes from the server. This is to prevent branching (something that we'll be looking into in the future).

    Now what you can do is have your teammate open the Collab History window, click on Go Back To on the revision before their change that broke the project and have them Publish that revert. That will essentially undo their broken change. Then you can Update which will let you Publish your changes without getting any of the broken changes.
     
  3. ev3d

    ev3d

    Joined:
    Apr 19, 2013
    Posts:
    327
    but when you "update" to that revert then you loose all YOUR changes.. So how do you just force the update?
     
  4. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @ev3d! Unfortunately yes, if you choose Go Back To on your machine then you will lose your local changes. But you could have either yourself or a teammate download that project into a new location, undo the changes that you don't like, Publish them, then back in your original project on your machine you will can Update and skip the bad changes without losing your local changes.
     
  5. MH74

    MH74

    Joined:
    Jun 17, 2019
    Posts:
    1
    Hello,
    I publish a lot of change on collab,.... server reply me error( not publish ).. ok I try again, same stuff.. then restart unity and collab said "You are up to date!"

    and Now What? nothing posted to collab cloud.. and all my changes is unchecked like done...

    unity version 2019.1.7f1

    I don't undesrtand why can't manualy check file or folder and publish to collaborate like selected stuff...
     
  6. ryanc-unity

    ryanc-unity

    Unity Technologies

    Joined:
    Mar 23, 2016
    Posts:
    1,724
    Hi @MH74, so you tried to publish your changes but Collab returned with an error (could you give more details around what the error said?). After restarting Unity Collab now says that you're up to date but no new commit was made in your history, correct?

    In that case, if you're using Collab v2.0 then you can press the Rescan button inside of the Collab Toolbar to manually check for local changes if they aren't showing up correctly. But if you're using v1.2 of the Collab package then you can force Collab to resync your changes by going into your project's folder, then inside of the Library/Collab folder delete the Collab snapshot file, then reopen your project. The Collab Toolbar should then resync and list your changes correctly.
     
  7. Coks

    Coks

    Joined:
    Jul 23, 2012
    Posts:
    25
    I had something similar. I did not push the project to collaborate server for a long time. As a result, the server suggested updating all revisions. My fix to save my local changes:
    1. Create new folder and drag all assets of project.
    2. Pull changes from the server
    3. Resolve all conflicts in favor of local changes
    4. Remove all assets received from server
    5. Return the moved assets in place
    6. Push local changes
     
    youssef-nagy, Vic070 and idurvesh like this.
  8. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    286
    We are stuck in a death loop with this problem, since Collaborate has corrupted some scripts, and we cannot delete the pushes related to them. The only solution we found was to use a different version control system.
     
    MorbidDev and TextusGames like this.
  9. idurvesh

    idurvesh

    Joined:
    Jun 9, 2014
    Posts:
    493
    thanks man
     
  10. AmarBagh

    AmarBagh

    Joined:
    Sep 27, 2015
    Posts:
    9
    Just wanted to share my similar situation and the response from support. It worked, so I copy pasted here in case it helps anybody.

    My question to support:
    I worked on a collab project from a second computer then pushed it. But I decided not to go with the changes on my main comp. Now, collab wont let me push and I don't want to "update" because I've changed so many assets and scripts, and tweaked a lot of 3rd party assets into submission. Updating seems like a bad move.
    Their response:
    I would suggest the following, which should get your project to the desired state.

    1. Make a back up of your project folder on your main computer
    2. Open the project and select Update (Your project should now no longer require update)
    3. Close the Unity Editor
    4. Replace the Assets and ProjectSettings folders in your Project with your Backup Assets and ProjectSettings folders
    5. Reopen the project in the Editor

    Your project should now be in the same state it was but the Collab toolbar should give you the option to publish your changes.


    Hope this helps
     
    ollieblanks likes this.
  11. oldrumors

    oldrumors

    Joined:
    Mar 2, 2014
    Posts:
    1
    @ryanc-unity I'm using collab 1.3.9, and worked a couple of hours and collab was not detecting my changes. I found this thread and went to delete the snapshot file, I thought "what's the worst that can happen right?". I reopened the project, and after the scan/ update or what ever it does, I found that all my work from the last hours was lost. Unity reverted all my changes in the scripts.
    I have to ask, how can this be? What sort of versioning system does this? Is this working as intended?
    I have to go grabs a couple of smokes to calm down and regain my will to redo all the work I had already done, but I have to say, Collab is no more. Back to some free git option because at least is trustworthy.
     
unityunity