Git Update overwrote all my code and deleted new files

2»

Posts

  • rmaciasrmacias USBeta, University ✭✭✭✭✭

    I'm curious. For those of you who have had this issue happen. Are you all doing a "Review & Commit" before you issue an "Update" command? (i.e are you all committing to your local repository before selecting "Update"?)

  • BadStormBadStorm ITMember ✭✭

    Just happened also to me, lost some days of work. ;(

    OS: Windows 10
    Xamarin Studio: 5.9.5

    In Option -> Version Control -> Git the option "Automatically stash/unstash local changes" is set to on, but if i do: "git stash list" i get nothing.

    Please correct this bug becouse or temporarily disable the "update" button, becouse is vary easy to press it...

  • PhillipUrreaPhillipUrrea IEMember ✭✭

    Ok this just happened to me, on a friday at 7 pm...... after having a very productive day.

    Anyway, luckily i was able to find my commits and remove my changes using

    $ git reflog

    Once you find the commit you're looking for, create a new branch from it and you're done!

    $ git checkout -b branch-name 70b3696
    Switched to a new branch 'branch-name'

  • MaxMyersMaxMyers USMember

    What kind of software company ignores something like this for 3 years? Each and every one of you who works at Xamarin should be personally ashamed of yourselves.

  • Algis78Algis78 USMember

    Same here. Lost hours of work by doing Update

  • JohnBeansJohnBeans USMember ✭✭

    Oh my god, this just got me, too.

    Arghhhhhh!!!!!!!!

  • YogeshPatil.2761YogeshPatil.2761 USMember ✭✭

    This happened with me too, lost 2 day's work. By mistake I pressed "Update" instead of Diff XS 6.0.1 build 9 - Git VC. And lost my all uncommitted changes. It's weird XS community still enjoy's Developers pain.

  • COME ON!!!! it happened to me to.. I lost a lot of work!!!! we are August 2016 now!!!!


    JUST DO SOMETHING!!!


  • JohnHJohnH GBMember ✭✭✭✭✭

    Has anyone raised this as a bug on Bugzilla? I have found that's the best way for Xamarin to take notice as these are peer forums. A replicatable use-case would be very useful to them.

  • DaveHuntDaveHunt USMember ✭✭✭✭✭

    @MariusUngureanu filed one some time ago. Since it's still broken, I assume the bug is still open...

  • lucascclucascc BRMember

    It has just happened to me. 1 week of work is gone.
    Something need to be done!

  • timdelaneytimdelaney USUniversity ✭✭

    He guys.. calm down.... If you had "automatically stash/unstash local changes on" you can get all your changes back by using gitk. If you don't have gitk you can follow the instructions for installing it on a Mac here..
    http://stackoverflow.com/questions/17582685/install-gitk-on-mac

    Once you have gitk installed follow the instructions found here to get back your hidden stashes. http://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git/91795#91795. You can use the GUI app to create a new branch from your recovered hidden stashes.

  • This solution from Timothy really works! Saved me a lot of work. I had the "automatically stash/unstash local changes on" enabled and after installing gitk and run the commands written on that last link I could see all changes on my git repository. You can do a lot of operations, in my case I created a new branch and after I merged with the master. Thanks a lot Timothy!!!!

  • @timdelaney said:
    He guys.. calm down.... If you had "automatically stash/unstash local changes on" you can get all your changes back by using gitk. If you don't have gitk you can follow the instructions for installing it on a Mac here..
    http://stackoverflow.com/questions/17582685/install-gitk-on-mac

    Once you have gitk installed follow the instructions found here to get back your hidden stashes. http://stackoverflow.com/questions/89332/how-to-recover-a-dropped-stash-in-git/91795#91795. You can use the GUI app to create a new branch from your recovered hidden stashes.

    Perfect! Thanks a lot!

  • timdelaneytimdelaney USUniversity ✭✭

    No problem Mauricio. Glad to help!

  • SantasLittleHelperSantasLittleHelper RUMember
    edited April 2017

    So, this also happened to me today on the latest version of Xamarin Studio. I lost three days of work just as I was about to publish my app!

    I am working with source code on TFS online Git from both Windows Visual Studio and Xamarin on a Mac. I pushed changes from Windows a few days ago and switched to the Mac version to finish some stuff and publish the app. Once I cleaned up the code I did Review & Commit and Push and got an error message that I had changes on the TFS online, which were not in my local code. There were no changes that I was aware of, so I didn't think it was anything major. It looked like the local Commit worked because I could see it in the source control log. Then I did "Update" to pull the mysterious changes from TFS and everything that I have done on the Mac since the last update was gone. I will try previously recommended solutions, but this should not be happening!!!

    If something is being overwritten, there has to be a warning!!!

    To be honest with you, the whole version control system and integration of Visual Studio and Xamarin is a disaster, I spent several weeks to find options on some obscure blogs how to set it up to work both from Windows and the MacOS with TFS backend. And we are talking about a Microsoft product! None of the options are consistent between Windows and Mac Xamarin source control. I could never get it to work when I made changed on both Windows and Mac. Many times I ran into issues when I had to check out the entire solution because VS on Windows refused to pull changes claiming that I had local changes which I didn't have. There are also other issues in the version control on Git when Xamarin Studio is merging the code which was pulled from TFS online.

    This has to be fixed or alternative solutions need to be provided. There is no way anyone would take Xamarin seriously with these kinds of issues with basic version control issues.

  • HabibMirandaHabibMiranda USMember

    My work was also lost due to this issue. Sure, as developers, we should be a little more careful when we work with git in general, but some warning when files will be deleted would be nice. Looks like this has been going on for almost 4 years now and it's a bit disappointing that it hasn't been corrected. Mr. @timdelaney 's solution above helped a lot and I was finally able to recover my work, but it was time lost that the company I work for had to pay for. We would love to continue using Xamarin. Please fix these known issues.

  • I created this post a few years back and I can't believe it's still happening!

    Over the years since I've found it much safer to just use dedicated source control software, such as SourceTree.

    Then it doesn't matter whether you're switching between Xamarin Studio, Visual Studio or Xcode, you know exactly what's happening and what to expect.

Sign In or Register to comment.