Search Unity

Unity's version control component has been upgraded to Plastic SCM.

Delete a commit?

Discussion in 'Unity Collaborate' started by Cynikal, Aug 17, 2016.

  1. Cynikal

    Cynikal

    Joined:
    Oct 29, 2012
    Posts:
    122
    So, I have my project, tried something new... Published the changes... It didn't work out.

    Restored a previous build.

    Made more changes...

    Now, I wish to commit my NEW build..

    However, it is only letting me "update" to the bad version with a lot of unstable changes.

    Is there a way around this?
     
    sean244 likes this.
  2. holliebuckets

    holliebuckets

    Moderator

    Joined:
    Oct 23, 2014
    Posts:
    496
    Hi @Cynikal,
    Short answer: Currently, no.
    However! Today I am testing the "Revert/Rollback" feature extensively, so know it is in the works and will be coming in a Preview build to a forum and email near you shortly :)

    In the mean time, the work around is to unlink, then relink your project to Services. NOTE: This will unlink your project from *ALL* Services and generate a new Unity Project ID. To do so:
    - Open the Services window (Window>Services)
    - Navigate to and select the hamburger icon
    - Select Settings from the menu
    - Select Unlink Project


    Again, watch for the new feature coming soon!
     
    rturyatemba likes this.
  3. Sylker

    Sylker

    Joined:
    Sep 22, 2012
    Posts:
    22
    Is the Revert/Rollback feature already out? Cannot find it anywhere...
     
  4. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    @Sylker, Rollback will be part of 5.6. However, you can try out the feature in the Collab Preview Build, 5.5.0x1, which you can see pinned near the top of this forum.
     
  5. Gurg13

    Gurg13

    Joined:
    May 25, 2013
    Posts:
    1
    I am completely stunned that you released a source control without the ability to control your trunk in the cloud.
     
    IOU_RAY, Rich_A and andrew-lukasik like this.
  6. AnthonyAckerman

    AnthonyAckerman

    Joined:
    Feb 20, 2015
    Posts:
    16
    I just tried to revert option. That works, but after doing a revert there is no way to publish again without doing an update first. so it basically brings you back to the commit you had problems with. A simple way to delete a commit would be great.
     
    NeatWolf likes this.
  7. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Which version of Unity are you using? 5.6.0f3 and later have the option to Go Back To an earlier revision where you can undo all changes after that selected commit. You can then make new changes and Publish to create a new HEAD of your project.
     
    IridiumMan likes this.
  8. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    This is still a problem in 2019. We cannot revert to an earlier version, since Collaborate corrupted important files, and we needed to send a .zip file over the internet with the project.
     
  9. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Same situation here, I'd need to discard a few commits, possibly even to the very first one, without recreating a new project, since the local copy is now ok, but the remote one isn't. (it asks me to Update)

    Collaborate seems to be messing up files with other teammates (small team, so Collaborate 2.x preview seemed like a good idea)

    Is this still an issue or there's a way to do that, somewhere?
     
  10. Rich_A

    Rich_A

    Joined:
    Nov 22, 2016
    Posts:
    338
    There's a workaround, which is to abandon Collaborate and use Plastic SCM, which we did and is working much better. Just setup the project with the correct ignore files at the very start.
     
    NeatWolf likes this.
  11. NeatWolf

    NeatWolf

    Joined:
    Sep 27, 2013
    Posts:
    924
    Workaround? Moving to a whole different system is quite a stretch for a workaround, especially if you have a team that doesn't know how to use it, purchase licenses, and upload everything elsewhere - and have a deadline in days :p

    I'd still have to revert *that particular* commit in Plastic SCM :p

    Yet, it's a good advice, in general. I lost more time because of issues with Collaborate than on polishing the project... this should never happen, especially with a well-paid (soon to be better-paid) product/license. :/
     
    IOU_RAY likes this.
  12. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @NeatWolf, I'm sorry that you've been experiencing issues with changes not being synced properly and being asked to Update when you're already up to date.

    I can recommend a couple workarounds:
    1) Download another copy of your Project and replace its contents with the ones from your original local copy, then Publish those changes to ensure that Collaborate has the correct latest version of your Project.
    2) Save your changes out to another location on your machine so that they don't get overwritten, Update to get the latest changes, then use the Collab History window to revert to your original commit. From there you can paste your changes back into your Project and Publish to have your most recent commit be a fresh start for your project.

    If neither of those options work then please get in touch with our Support team by opening a Support Ticket from the Developer Dashboard and include a link to this forum so that we can look back towards any discussions had here.
     
  13. kburkhart84

    kburkhart84

    Joined:
    Apr 28, 2012
    Posts:
    910
    Why is it still a thing that that I can't commit a project as the newest commit without first updating to the newest commit first(which in my case corrupts things)? I made a few mistakes and my project was corrupted and I commited those corruptions. I was smarter than the average bear and of course was able to restore a local backup to the good state, but then I can't delete that latest commit, nor can I make any new commits based off my local restoration without updating to that new commit that is bad.

    That said, the the "workaround" of unlinking and recreating the project seems to be working fine(I'm currently 39% into the upload)...but the issue is that I shouldn't have to do that workaround. Any good source control lets you have better control of your commits, and would have let me make a new commit with those restored previous versions without having to update to the newest corrupt commit...in fact, you should be able to either delete that commit if you choose, or just make a whole new commit leaving the bad one in there.
     
    sean244 and IOU_RAY like this.
  14. parker2009120

    parker2009120

    Joined:
    Aug 7, 2017
    Posts:
    2
    The problem I have is when i pull, unity crashes, so "copy my files to another location -> pull -> update" fix is not available to me.

    Any other workaround?
     
  15. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @parker2009120, would you be willing to share the stack trace for the crash here?
     
  16. pedroharres

    pedroharres

    Joined:
    Sep 14, 2018
    Posts:
    5
    Hi! So I have a similar problem.
    I made a big project clean up, moving and renaming many files, as well as deleting obsolete stuff. mostly animator controllers and ".anim" files. and I pushed it today.
    When my intern got the push, unity created again many of the files in her machine. now she pushed it by mistake and we have several duplicated files all over, that I believe may generate broken links with objects that were using those animators if deleted.

    I believe that the problem happened when collab wrongly identified renaming/moved files as new ones by my push. then when she received the push, some files in her machine were identified as missing in comparison to the cloud and then either recreated or just mistakenly marked with a "+" as new files.

    @ryanc-unity you can check it here if you want.

    UPID: fb77517d-fe8f-4ea1-ae5e-09cd3336f187 (I imagine this code might lead you to my dashboard)

    can't I just delete her push somehow? it would be a lot easier than going through all those objects, deleting duplicates and checking for broken links scene by scene, prefab by prefab.
     
    Last edited: Apr 3, 2020
  17. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Hi @pedroharres, it's possible to ignore a commit by syncing to the latest revision first. Then, in the Collab History window, you can Go Back to an earlier commit before the mistaken publish, then press Publish in the Collab Toolbar to undo the following changes. That should resolve any broken links with your animations.

    As for the duplicated files, could you tell me which OS you're running on as well as which version of Unity and Collaborate?
     
  18. pedroharres

    pedroharres

    Joined:
    Sep 14, 2018
    Posts:
    5
    thanks @ryanc-unity! MacOs Mojave Version 10.14.6. Unity 2019.2.9f1 personal
     
  19. Ryan-Unity

    Ryan-Unity

    Joined:
    Mar 23, 2016
    Posts:
    1,993
    Thank you for the added info. Let me know if going back to an earlier commit restored your animator references or not.