All changes lost on git update

Hi all,

On the 15th of May I added version control to a project I've been working on in Xamarin Studio and made an initial commit, which I pushed to bitbucket. All was fine, and the code was viewable from bitbucket.

Then before starting work on some improvements of the app, I made a new branch and started working on it. Today I pressed "Version Control --> Update Solution" and "Version Control --> Merge Changes" which resulted in all the code I had written since the initial commit on the 15th of May being deleted. The logs both on my computer and on bitbucket shows no entries since the 15th (initial commit). What might have caused this, and do I stand any chance at getting the files back?



  • mhutchmhutch USMember, Xamarin Team Xamurai

    Were there any errors at all that could have cause the pull to fail?

    I'd recommend checking git stash pop if you had uncommitted changes. XS uses git stash to store uncommitted changes before updating, and if there was some error, perhaps it did not pop the stash afterwards.

    If you had made commits that are missing, then you can find lost commits using tools such as git reflog, assuming you have not done a git gc.

  • FredrikHoelFredrikHoel NOMember

    Thanks a lot for your help Michael! I followed this guide and found it as a dangling commit which I was able to rebase to and recover the code.

    Again, thanks a lot for the fast response and help!

Sign In or Register to comment.