Re: Accessing Xcode 4 local Git repo in Xcode 5.0.2
Re: Accessing Xcode 4 local Git repo in Xcode 5.0.2
- Subject: Re: Accessing Xcode 4 local Git repo in Xcode 5.0.2
- From: Peter Teeson <email@hidden>
- Date: Fri, 13 Dec 2013 00:07:37 -0500
On 2013-12-12, at 10:24 PM, Quincey Morris wrote:
> As a result of a similar discussion in the forums, I *was* able to reproduce your inability to add the repository. I finally got it recognized by using the repository add (in Preferences/Accounts), then quitting Xcode, then having Xcode re-launch and open the project. When the project re-opened, it was under source control. (The easiest way to check is to select the project item in the navigator, then use the file inspector to see the big green dot in the SCM status at the bottom.
>
> If your .git file was one level lower (which was a configuration that did work in Xcode 4, I think, though of course the project file itself would not be in the repository), it’s going to be harder to “move” the .git file up a level, since literally moving it will break all the paths it contains. My git skills aren’t great enough to know how to fix that, but I suspect the trick is to use a ‘git rename’ in some form to add the extra path component to all of the repository contents, then to move the .git file.
Whew I did finally get it to work. For the record here's how I did it under ML 10.8.4 & Xcode 5.0.2
Given paths as follows:
//Volumes/Data/Development/MyProjects/FooBarWS/FooBar/Foobar/<the project files> and
//Volumes/Data/Development/MyProjects/FooBarWS/FooBar/FooBar.xcodeproj
I dragged the
//Volumes/Data/Development/MyProjects/FooBarWS/FooBar folder (which had the .git dir) to the MyProjects folder
Then in Xcode Source Control menu selected Checkout
Selected the original that I had dragged and named the new dir, editing the file:// expression as appropriate.
That did it and selecting the project item in the Navigator in the checked out copy the file inspector showed the green dot (after scrolling down appropriately)
I think that will work for my other projects who have the structure
//Volumes/<some path>/Aproject/Aproject/<project files> and
//Volumes/<some path>/Aproject/Aproject.xcodeproj
I examined my other projects created under Xcode 4 and they have that structure.
In a way it's not bad because you don't need to worry about adding .xcodeproj to the gitignore file.
And you get the benefit of backing up the .xcodeproj files without messing up the actual project files directory.
But that's just my take on it at the moment.
Thanks for your encouragement and help.
respect
Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden