I accidentally clicked discard changes (thought I had a snapshot)... anywho, before I start up of the 7 hours of lost time, does anyone know if there is a 'trash can' or something hiding in Xcode that may have the file I discarded? Or is there any other way to get it back?
Thanks
This is a perfect job for Time Machine.
Related
Unfortunately after swearing to never use the hunk of garbage that is Dreamweaver again, after 7 years - I found a need for some WYSIWYG editing and installed the complete hunk of garbage software on my machine.
I simply knew there would be some disaster awaiting, so I was being really meticulous about backing up.
But I got caught not backing up for about 4 hours, and lost those 4 hours of work to yet another of the endless array of bugs that will completely destroy your work when using Dreamweaver.
I was using CTRLZ multiple times when suddenly the code went all weird and blocks of code went missing, and it looks like sections were just cut in mid line - and it just went from ugly to uglier. I recognized this nightmare form 7 years ago - the exact same reason why I stopped using this garbage software to begin with and swore to never use again. Right now I am wishing I kept my promise to myself.
So I was really careful not to save the document, but the fun thing is - every time I hit CTRLZ - Dreamweaver is "conveniently" saving the file to the server.
I do want live updates as I hit "Save" or CTRLS, but I DO NOT want anything saved when I hit CTRLZ!
So knowing that I want to use CTRLZ, and knowing Dreamweaver is complete garbage and will crash and kill my code.
How do I turn off automatic saving when I hit CTRLZ?
As a secondary question - how about how do I prevent losing my code again with this hunk of garbage software?
You probably have auto-save AND auto-sync turned on together, and auto-save might have ran shortly after you undid changes, following which the file was uploaded to the server by auto-sync.
Simply switch off auto-save so that only a manual save will trigger an upload.
Also another option that may accidentally revert your changes is the Auto Recovery feature, that reverts your file to an incorrect state when Dreamweaver crashes (or encounters a bug). If auto-sync is switched on as well, that may cause a corrupt file to be uploaded.
Simply switch off Auto Recovery so that no corrupt files will be uploaded.
This may sound strange, but I am having issues with Xcode mixing branches, or at least messing everything up.
I created a new branch (v1.4), then created a new data model and renamed an entity. Had to switch back to previous branch (v1.3) to check something and I get errors at run time on v1.3, it's looking for the new entity name from Branch v1.4 - what the %$^#% is happening. I searched the files, the new entity name is nowhere in v1.3.
I switch branches again to v1.2 and it ran fine. So, switched to V1.3 again - nogo. Switched back to v1.2 and it has the same issue now, runtime error because it can't find the new entity name.
What is happening? Anyone else have this issue?
Any thoughts/suggestions would be greatly appreciated.
OS X 10.11.6
Xcode 7.1.1
==[EDIT]===
I am not real familiar with GIT, just starting to learn. I ran the couple commands as mentioned, get nothing for either git diff commands.
Running git status --ignored I do get multiple files as untracked - still working on understanding why (Separate issue) - couple object files and 2 data models (Was 3, but manually added one to commit.
Also I get 3 ignored files:
.DS_Store
projectName.xcodeproj/project.xcworkspace/xcuserdata/
projectName/.DS_Store
That's as far as I've gotten. Not familiar enough with git to know if these ignored files are the ones I should delete.
Second option - will restoring from time machine fix this? It may be a little extra work for me to recreate v1.4 but probably less time than I've already spent trying to figure out how to fix it.
I do appreciate both comments so far - thank you.
==[SECOND EDIT]==
Thanks again for your comments.
However, do to time and schedule I perform a Time Machine backup before ElpieKay posted the last comment, so I will not be able to test it.
Reverting back did "fix" it as you'd expect, but I did lose several hours of work but life happens. I will keep this for if/when this happens again and try the git clean -df to see it fixes it.
On a side note - while I was switching back and forth between V1.3 and V1.4 trying to figure this out, 2 of the model versions disappeared on v1.4 - i.e. the name turned red in Xcode and when I viewed the contents of the file they were missing. I do not know if this is related or not, but I thought I would mention it. This happened one other time and I thought maybe I did something - I did a time machine restore to fix it last time. Wonder if git clean -df would have fixed it.
I made a project on eclipse for school to hand in. I edited some minor things in my program in a rush and handed it in without checking if my program still ran. Turns out it didn't, and I can't seem to find the error. I don't have time to figure it out. if I did a system restore to that point in time before I handed it in, will my project be at the same state it was, at that time?
thank you
Sorry, I know this isn't the right section but I'm new to this site and don't know where to go...
I modified a file in IntelliJ IDEA that modification not saved on that day since I lost that changes I try to get back that code but its doesn't show any changes on that day and time how to solve this?
What you describe is a very unusual situation; one I've never heard of happening in my 12 years of using IDEA. IntelliJ IDEA automatically saves files at critical times, including closing the program. The only thing that would prevent it from saving a file is if there were permission issues with the directory containing the file. But even then, it should warn you that the file is read only and cannot be saved.
If the problem continues to occur, try uninstalling and reinstalling IntelliJ IDEA. Other than that, make absolutely sure you are editing the file you think you are editing. Perhaps there is a configuration problem.
I know this is a site more for coding questions, but I have been having a problem with my game crashing for about two weeks now, and Apple hasn't even begun to be helpful in solving the issue or even identifying what it could be. I was hoping maybe someone has experienced something similar and could at least get me pointed in the right direction.
For about a week I had a problem with Xcode crashing every time i accessed a current file (gameboard.m) in my game. This file had existed in my game for months and NEVER caused a crash and never did until a few days after I installed Xcode 5. Whenever I would be working, and click on my gameboard.m, it would, with increasing frequency, crash xcode. When looking at activity monitor, my free ram would go from 5gigs to about 10 mbs, and I would have to force-quit xcode.
After gameboard.m would crash xcode, it would crash xcode upon opening every time after that. I found a temporary fix for the issue by duplicating my file, going into it and deleting the gameboard.m file, then copy and pasting it from the previous version and re-importing it.
Sometimes I could click on gameboard.m and it would open just fine, but then if i press Cmd+Opt+Shift+Left to collapse all my methods, THAT would crash xcode. Every time xcode crashes its the same thing, Ram goes to 0, freezes until force-quitted. After the first week and about 30 copy-pastes fo my game, my quick fix stopped working and I couldnt open ANY file on my desktop, including files I havent opened in months.
So far I've submitted a bug ticket, to which i have gotten no replys besides asking for additional crash reports, I've reinstalled xcode MANY times, created a new user and tried working on that, and am about to reinstall my OS. I'm trying to figure out if it is a code related problem, or a hardware problem that needs to get fixed. I know I have some memory leaks in my game which I am trying to address right now (I've been teaching myself how to program since the start and this has been a gaping hole in my education until now. Any good source material you guys know of point it my way!!)
Side question: If you have a memory leak, when does the computer take back over the allocated ram? Exiting simulator? Restarting computer?
Again, i know this is a bit of an unusual question for SO, but I've been unable to do any work for 2 weeks now and I cant see any end in sight, so any help or ideas i can get from you guys would be very helpful. Thank you!!
The most common way to resolve Xcode crashes is to clear out the derived data directory. Go to Preferences>Locations to find out where it is. Delete the whole directory tree. The default is ~/Library/Developer/Xcode/DerivedData but it may be different for you.
That said, the fact that this continued even when you were working as a different user is troubling, since by default the derived data directory is per-user, but it is possible you've set it to a single place.
I'm assuming by 'bug ticket' you mean the RADAR system (with its new facelift). If this is really preventing you from working on your app and that is critical, what you need to do is file a Technical Support Incident. You get 2 with your developer account, and you can buy 2 more at any time. This will put you in touch with an apple engineer that will focus on finding a solution to your problem as quickly as possible. I've only had to use it twice, and both times they had a solution for me within 48 hours.
I solved this by closing the project, then opening only the offending file in Xcode 5. Then 'Save' and the project then opened fine!
My Xcode was crashing every time I opened it for the last opened project. I got the issue resolved by following the following steps took from here.
Open a Finder window and navigate to your project
Right-click on the .xcodeproj file (it’s a package actually)
Select Show Package Contents
A new window appears
Delete a folder called xcuserdata
Also, delete scuserdata folder from project.xcworkspace inside the .xcodeproj file