How to recover committed changes git Xcode? - xcode

I committed changes to a local git repository today in Xcode so that I could go back to an older version. The newly committed changes from today are not showing up in the source control tab within Xcode; however, when I navigate to the .git folder in Finder, I can see the commit message in the COMMIT_EDITMSG file. This leads me to believe the commit did work, but for some reason Xcode isn't recognizing it. Is there any way to manually recover those committed changes from Finder if Xcode won't recognize them?

Related

Recovering a project?

So... how to recover a project? I recently changed the name all over the place and it was working properly. Today I stashed changes and committed, a popup appeared stating some file needed to be saved again and I did.
After this, the project doesn't open with this error:
Project /Users/{User}/Desktop/Proyectos/To Battle!/To Battle! BACKUP.xcodeproj cannot be opened because it is missing its project.pbxproj file.
What's worse is that the files I had open on Xcode and was editing, and compiled, and worked are nowhere to be found. Not on my comp, not on my iCloud Drive, nowhere. Ran a find / with some name of the files and there are results on /Users/{User}/Library/Developer/Xcode/DerivedData/Battle_Plan-fmoltogzcytatsanjtyvicdzzcjk/Index/DataStore which is the old name of the project
And here: /Users/{User}/Library/Developer/Xcode/DerivedData/To_Battle!-cgasouaduxuosbbpbnuqcrgkxump/Build/Intermediates.noindex/To Battle!.build/Debug-iphonesimulator/To Battle! (iOS).build/Objects-normal/arm64
which contains all my files in different formats: .d, .o, .dia, .swiftdepts and looks like the compiled code of my test runs on the simulator
So, any ideas on how to recover the project? I also had made a git stash and commit for the changes before everything broke...
Create a new git branch from the last commit you made before everything broke.
Press Cmd-2 in Xcode to open the source control navigator.
Select the current branch from the source control navigator to see all the commits you made on that branch.
Select the last commit you made before everything broke and right-click.
Choose New Branch from.
Name the new branch.
Select the branch you created from the source control navigator and right-click.
Choose Check Out.
Now your project is where it was before everything broke.
The source control navigator has a Stashed Changes folder. Your stashes should be in that folder.

In Xcode project, Accidently reset all the uncommited changes, can I get it back?

In My xcode project, Throught sourceTree, I reset all the uncommited changes, is there any way to get it back from git or xcode?
Not probably via git but via xcode , i believe xcode keep local history found a blog https://codeforfun.wordpress.com/2015/09/30/xcode-local-history/ can check if this works.

Source control wiped project

I had a project I'd been working on and I wanted to start a new branch so that I could make edits without ruining the original
I went to source control, new branch.. etc. I ended up discarding all changes in the new branch but when I returned to the master branch, everything was gone. My files are still in the folder in finder but they arent showing up in xcode. My storyboard files when opened separately are blank.
Is there anyway to fix this?
If your changes are saved in remote repository, then you can pull all your changes for that branch from remote repository.
on master branch run this command
git pull origin master

Git commit checkbox is not ticked

I'm using Xcode 8.0.
Sometimes, when performing a commit, the checkbox is unchecked for some files. Most of the files are ok, though. I've not seen this before. The file is listed when I run git ls-files from command line before I tick it. It also have a long git log history.
I checked the checkbox and did the commit. I then made a small change, and did the commit again. The file is still unticked. Howcome?
Have you seen this? Is it a bug, or is my repository or XCode messed up?

Xcode 4.4.1: how to disable auto commit for several changed projects?

Does anybody is facing a weird svn auto commit behavior in xcode 4.4.1? Have noticed, if working with several projects at the same time and you are doing svn commit then Xcode grabs all changes from several projects and tries to commit them all. It very annoys me as it's very easy to commit unfinished changes accidentally, because Xcode svn commit opens a tab where only changes of active project are shown. Is there a preference setting for disabling this?

Resources