Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice
Unity's version control component has been upgraded to Plastic SCM.

[Solved] Rollback to the file before collaborate

Discussion in 'Unity Collaborate' started by ProjectBarBar, Jul 22, 2017.

  1. ProjectBarBar

    ProjectBarBar

    Joined:
    Jan 28, 2017
    Posts:
    7
    Hi, my team member made changes in local disk and then collaborated(download) from the server,
    so changes are gone. It is overwritten by downloaded project.

    Team member wants to get back his work.

    In this situation, how can the team member do to get back his work??
    This function might be different from "revert" and "go-back".
     
  2. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @ProjectBarBar! It sounds like your team member forgot to save their changes before they Updated to get the latest from the server. I'm very sorry but I'm afraid that those changes are lost. Can you let me know which types of assets (scenes, scripts, etc.) had progress lost for your teammate?
     
  3. TomekCoduar

    TomekCoduar

    Joined:
    May 16, 2017
    Posts:
    22
    Hi @ryanc-unity
    Rather than creating a new post i would like to ask it here because it seems similiar.
    Today my colleague pushed some changed to collab, i downloaded it and it looks like he made a lot of bad changes that shouldn't have been done. Is there a way to lets say: Go back to point before his commit? Or completely delete his commit?
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @TomekCoduar! Yes, there is. You can open your Collab History window (either via the Collab Toolbar or by going to Window->Collab History), find the problem commit in your history, then use Go Back To on the commit before the problem one. That will move you back to the commit before the one with the bad changes. Then you can either Restore in the Collab History window to undo that and return to the current head of your repo, or Publish in the Collab Toolbar to undo all the changes between HEAD and the commit you went back to. That will let you essentially undo all of the following commits. Let me know if you have any questions.
     
  5. TomekCoduar

    TomekCoduar

    Joined:
    May 16, 2017
    Posts:
    22
    Okay, thanks for answer! :)
    But what about changes between good commit and bad commit, lets say yesterday I made some commit that was okay, after that I made more changes, and at the same time my colleague pushes some his changes, at that moment i got some changes after my last good commit and I need to pull his changes. His changes are corrupted / bad and if I go to my last commit i would loose some new changes right? Correct me if I am wrong :)
     
  6. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    You are correct. If you have any local changes that you haven't Published yet and there is a bad commit that you still need to Update to get, then using Go Back To in the History window will cause you to lose all of your local, unpublished changes. You'll need to copy out your local changes before you Go Back. Then once you've Published from before the bad commit you can paste back your good changes and keep working.
     
  7. TomekCoduar

    TomekCoduar

    Joined:
    May 16, 2017
    Posts:
    22
    Okay, from what i know you are working on branches right? I can imagine in the future it will be possible to do it right? :)
     
  8. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Branches are among the many cool new things that we're looking into. It's too early to give any definite details but we'll be sure to update everyone here if we have any new info.
     
    TomekCoduar likes this.
  9. rryba

    rryba

    Joined:
    Feb 21, 2017
    Posts:
    8
    I've got some problems with collab , i revert changes in one computer and click collab on another, but old changes remove my new script files . Its possbile to take it back ? Its F***ign crazy it deleted my new files with old ones !
     
  10. nickjoshuamontemayor0121

    nickjoshuamontemayor0121

    Joined:
    Apr 24, 2022
    Posts:
    1
    Today i just try unity collab and discard toggled changes without publishing first. Now all my current files in my project are deleted. I just want ask, is there a way i can't recover all my files