Can I recover a different version of a file on VSCode after clicking the wrong button on "resolve save conflict"? - visual-studio-code

I opened VSCode and was presented with a notification that there was a conflict between two versions of a file. I followed the prompts and got a side-by-side comparison of two versions. I clicked the button that accepts the newer version, believing that VSCode had correctly inferred which version was newer. It had not, and I lost a significant number of changes to the file. Is there a cached copy of the other version anywhere?
Thank you!
ps - I seem to have failed to actually commit the changes in git as well. Not sure how that happened.

After searching through the VSCode appdata, I concluded that it wasn't likely that there was a copy. I found a copy of the bytecode (.pyc file) and used uncompyle6 to get an approximate copy of the version of the .py file I needed to recover. Was able to manually merge from there.

I was flummoxed by this one too. The answer is that you can restore the old version by hitting undo until before the change was made.

Related

Eclipse freezes when I try to open compare view

As part of a routine code update, I was comparing my versions of several Java files with the versions from the SVN repository I use. I noticed that one of my files was corrupted, and so I restored it from a backup. However, now when I try to use Eclipse to compare the newly-non-corrupted file with the SVN version, Eclipse freezes. I have tried restarting Eclipse (many times), checking for Eclipse updates, and rebooting the computer, all with no success.
I'm running Eclipse Mars.2 on Windows 7 Professional.
How do I get Eclipse to stop freezing and actually compare the files?
UPDATE: I have been able to do other things in Eclipse (such as editing code, running the Android emulator, etc.) but the compare-files function still causes it to freeze, at least with this particular file. I don't have any other files that need comparing, so I can't test that.
You might just make some arbitrary non-breaking changes to other files just to see whether the compare is generally broken or if it's really just that file.
Alternatively you could copy paste the file into notepad and back in case it's some odd special char that's causing the issue.

Why did the GitHub windows client delete all of my work?

Yesterday, I decided I wanted to upload all of my old crappy work. It is back when I was just starting programming and just wanted to show people it. I have never used git (very bad decision in my part) and created a repository. I downloaded the windows client and the egit eclipse plugin. I used the egit plugin but it just moved everything to a Oder and made it a local repository. I then used the windows client to submit a commit. It was taking a while so I left it on and went to sleep. I woke up this morning and everything was deleted except the folder names, .gitignore files and .project files from eclipse. Is there anyway I can get this old work back.
Thanks!
At the root folder of your project, run gitk from the Git Bash and you'll see your changes.
I have found a solution here: https://www.quora.com/Git-revision-control/How-do-I-retrieve-added-files-but-not-committed-from-a-reset?share=1
Basically you can retrieve the files from blobs but you have to do this one by one. I am writing a program to do so automatically now.
Is there any other easier way though?
If so, I would be glad to know.
Edit: Oh my I completely forgot about the previous versions tab on Windows. I'm just doing that.
Thanks!

How can I stop eclipse+git on windows from screwing with file permissions?

We have files that should be executable, and are happily executable in git, but then editing and committing the file from Eclipse on Windows results in the file mode being changed to remove executability.
This happens regardless of whether core.filemode is set to true or false.
Basically egit seems to be too naive for our purposes (breaking file permissions is the problem, but it also doesn't seem to support git-svn) so we're using msysgit instead - we have to manually refresh in Eclipse after switching branches etc, but that's a small enough sacrifice compared to it breaking our code.
There are recent fixes for the filemode problems post 1.2, e.g. use the nightly build.

xcode scm failure: conflict with [username].mode1v3 package file

I get this error in realtion to my [username].mode1v3 package file:
Error: 155015 (A conflict in the
working copy obstructs the current
operation) Description: Commit failed
(details follow):
I can do a compare from the SCM results menu on this file. Doing so reveals 102 conflicts (differences) between my local copy and the latest version in the repository. Problem is I don't understand what this file relates to or how to fix it. Differences occur in the file under keys like
PBXSmartGroupTreeModuleColumnWidthsKey
which I have no idea about.
I am the only one working on this project. How is it possible to resolve a conflict such as this?
Many thanks.
Sounds like you're probably working on two computers?
Any conflicts that happen in that file can safely be ignored - just tell your SCM to accept your local version. It's one of the files Xcode uses to keep track of your project state within the IDE.
I'd recommend taking it out of source control and telling your SCM system to ignore it.
This file contains your personal Xcode settings (like window positions and so on). It should not be under version control at all.

TortoiseSVN unable to remove conflict markers?

I know this may sound silly but it seems that, my version of TortoiseSVN is unable to resolve conflicts even for text files. I've followed the manual to the letter (By selectingEdit Conflicts the resolving the conflict via Winmerge, and then, selecting Resolved), but when I viewed the text file, the conflict markers are still there. Is this the expected result? I may be missing something here, but I was expecting the conflict markers to be removed after I did the steps the the previous statement. I thought it maybe winmerge not properly saving, so i tried to upgrade it, but to no avail. I also tried using Araxis merge but also no luck. I think I'm just missing something here but what?
BTW the ff. are the versions of my programs
TortoiseSVN
TortoiseSVN 1.6.7, Build 18415 - 32 Bit , 2010/01/22 17:55:06
Subversion 1.6.9,
apr 1.3.8
apr-utils 1.3.9
neon 0.29.3
OpenSSL 0.9.8k 25 Mar 2009
zlib 1.2.3
WinMerge
Winmerge Version 2.12.4.0
This the configuration for Winmerge in my TortoiseSVN
[WinmergePath] -e -x -ub -dl %bname -dr %yname %base %mine
Did you try it with TortoiseMerge (the merge program included with TortoiseSVN)? In TortoiseMerge, be sure to save first, then click Resolved inside TortoiseMerge.
I've had this happen with my .cs files. There are times when I have to delete the directory contents and update my side again. Even when it meant that I would have to re-apply some of my changes. Like saving anything you are working on, doing intermittent updates will ensure that you have little work to redo should something fail.