I while ago I removed the .git folders manually from my Xcode (5) project and switched to svn. Ever since I have about 400 missing file warnings like
file:.../.git/objects/f2/4f16e85d07b97f2953a15b302a626806530431: warning: Missing file:
.../4f16e85d07b97f2953a15b302a626806530431 is missing from working copy
Strange thing is, Xcode sees the project as a svn repository, I can view the revisions.
I think that those files are still somewhere in my project.pbxproj file.
Is there some way to remove these references automatically without destroying my svn repository? I am afraid that disabling version control from preferences will disable subversion and not fix my problem.
It is not a huge problem, but it's kind of annoying.
It's complaining about files in your ".git" folder.
Go to Terminal and "cd" followed by the path of the folder where your source code lives.
For example, something like: "cd /Users/whateveryournameis/Desktop/YourAppLivesInHere".
Then type in "ls -al .git". If you see one listed, you can remove the whole folder via "rm -rf .git".
Well turns out it was a svn problem. I had deleted the .git files, but they where still in the svn repository. Did an update, then an svn delete on the .git folder, recommitted.
The files where still reported missing for me in Xcode, so I created an empty .git directory, added it, deleted it with svn delete and restarted Xcode, the warnings are gone :)
Related
I did a silly mistake and deleted .xcodeproj file from command line. Since it's deleted from command line it's not in bin so it's gone. I've all other files in the project. Is there any way to recreate .xcodeproj file and fix the project?
I'm using local git provided by xCode as default, not sure if it will help?
If you haven't committed the deletion of the file, do the following:
Open Terminal
cd /path/to/my/local/repo
git checkout -- myproject.xcodeproj
I am using Xcode to as my IDE for coding questions that I publish and commit to my GitHub account. However, I don't want the ProjectName.xcodeproj to be shown in the repo. Is this possible?
Also, how do you suggest managing .gitignore files in Xcode? The only solution I have come across is managing it manually via terminal.
I've tried creating a .gitignore file via gitignore.io and then going into the project directory via terminal and using curl http://gitignore.io/api/c++,xcode > .gitignore. This has no effect whatsoever.
This has no effect whatsoever.
This would have no effect if the files listed by the .gitignored are already tracked.
Try (now that you have a .gitignore in place) git rm --cached -- ProjectName.xcodeproj, and then see if that file is still in XCode Git status.
Commit and push: that file won't be in the repository anymore.
This is regarding Xcode 9.2. I added a framework (local Git repo) to my project, then deleted it when it did not do what I needed it to do. Now when I do a commit there is a popup with the old GIT master listed there, even though there are no source files for that repo in my project anymore.
In Xcode, in the Source Control Navigator, the unused GIT master repo was still listed there. I tried right clicking and the "Delete" option was grayed out:
I tried several command line GIT commands (found here on SO...) to clean things up but nothing had any affect.
I tried recreating the Xcode project from scratch and that unused GIT repo master still shows up in the Source Control Navigator.
I searched on SO for a couple of hours but didn't find anything regarding this issue.
So, how do you remove an unused source control master in Xcode?
I was searching around for references to the unused GIT repo and after spelunking around in the Terminal with this find/grep command:
find . -type f -exec grep -i MYREPONAME {} \;
I eventually found a reference here:
~/Library/Developer/Xcode/DerivedData/MYPROJECT
So I quit Xcode and I deleted that directory:
rm -rf ~/Library/Developer/Xcode/DerivedData/MYPROJECT
And now the reference to the unused GIT repo master is gone from my Xcode project. Perhaps this is an Xcode bug?
There may be a cleaner way to fix this problem, but this manual hack did work.
Based on Kévin Renella's answer, I manually modified ~/Library/Developer/Xcode/DerivedData/MYPROJECT/Blueprint.xcscmblueprint and just removed the offending repo along with any reference to that repo. No need to delete the whole file and risk loosing other repo references.
I have a project I started with Xcode 3.0. Back then source files were stored in the root directory by default. A long time ago I even did this. Things have evolved, both the project and Xcode and I now have a curious situation:
I have a root folder with the .xcodeproj folder used by Xcode and a ton of old source files I will not use again. More recent versions of Xcode have created a similarly named folder where more recent source files exist.
I'd like to clean up my repository. What should I do with the files I am no longer using? Move them to a separate folder? hg rm? Checkout the repository anew but from a specific revision?
Just do hg rm, files will be moved out of way but kept in the history. That's the very reason why version control exists. Should you ever need them in the future, checkout a past commit and they will be back.
I have a folder that both XCode and SmartSVN both claim is "already under version control." However, when I run svn status in that folder, it says it is not a working copy. Furthermore, I cannot add or subtract the folder from the working copy in SVN, for if I add it (with or without recursion) it claims it is already under version control, and yet there is no context option for me to remove it from said version control.
Furthermore, when I check to see if there is a .svn folder in that directory, there is not.
I have tried svn cleanup in the working directory root as well as the directory in question. When performed at the root it completes with no messages. When performed in the directory, it informs me that it is not a working copy.
It is causing an annoying Obstructing - warning in XCode that is bugging me.
If anyone knows what I am talking about or has experienced the same thing please help me out!
It happens when the parent folder gets out of sync with some of its children. A possible workaround is renaming the parent folder offline (using the file system, not via svn), get a fresh copy from the repository and then bring back your modifications from the renamed folder (excluding the.svn ones).
When finished delete the renamed folder. Otherwise you might end up with broken folders:
If you renaming a project, Xcode does not remove the .svn directory in
the .xcodeproj. As a result, svn gets confused, thinking the renamed
project directory is under version control
[source]
Make sure XCode and SmartSVN are expecting the right version of you SVN installation. After last upgrade of SVN, I noticed that things have changed in how SVN handles things. Everything is now stored in the root checkout folder, and you don't have .svn folder in ech sub folder anymore.