I have a local git repository that I set up with a project in Xcode 4. The repository shows up fine in the Organizer and I can see commit histories and Source Control icons in the File Navigator. Commits work fine as well. However, when I use the version editor, I get the error "This file does not exist at the requested revision" whenever I try to see any previous revision. I can't find any information on this error and have no idea how to fix. git log
shows four recent commits (I know there are more, but I don't know if this is a restriction of the command or if something's disappearing). Any ideas?
I just ran into this same problem. I think (in my case anyway) that it was related to the fact that I had move the project directory outside of xcode. I believe xcode had cached some index files off in ~/Library somewhere. They seem to have gotten tangled up by the move.
The fix (for me) was to open xcode, open the organizer->projects pane and find the project in question. Delete the derived data (there is a button in the upper right pane for this).
After this, everything seemed fine.
This helped for me:
file://....<full path, which contains the .git directory>
. Make sure to have Type set to "Git", Xcode changed it to "Subversion", ignore the message "Authentication required"I encountered this when I changed case in a class name. Git had a lower case letter where I wanted upper case. I tried many of the things above shy of completely rebuilding the repository. I finally simply removed the class from the project, changed the name slightly then re-added it.
I'm guessing this is one of these problems that could be caused by multiple issues. This is mine and how I solved it.
My project had some file system name changes in progress. Namely, moving from all lower caps to Pascal casing. This got backed out at some point during my coding cycle. When I checked in, the file system was:
mydirectoryname
All the files under mydirectoryname
were no longer managed by git under Xcode. When viewing under the Version Editor, I ended up with the "This file does not exist at the requested version" error message.
However, if I selected one of the files and clicked on the File Inspector (available in the Utilities pane), I noticed the full file path was listed as:
MyRootPath/MyDirectoryName/TheCodeFile.h
I closed Xcode, opened the .pbxproj file in an editor, fixed the path, and reopened the project. Git integration was working once again.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With