How to save versions of the project in Xcode 5 - xcode

I'm new here.
I created a project and edited it few times. to back up I made a copy of the project folder. I see that in the Xcode 5 appears Source Control and I try to use it for my project versions back up. I selected from the menu: Source Control > Check Out - and entered a Repository Location => it created an empty project (with my project name). How can I save versions of a project?

I recommend not relying on xcode's built-in version control.
Try out http://github.com

For local use the building Git is good, commit often.
See, the Apple WWDC-13 session 414 (Understanding Source Control in Xcode) for more information.
For secure off-sit setup a remote repository, GitHub is the most popular but not free for private repos. Bitbucket is free for limited private repositories and is easy to use.

Related

Xcode 6 Source Control with Assembla fatal: repository 'https://xxx#subversion.assembla.com/svn/xxx/' not found

Does somebody has experience with Xcode 6 / Assembla ?
When I want to push or commit files, Xcode seems to contact the repository and then ends up with the following error:
fatal: repository 'https://xxx#subversion.assembla.com/svn/xxx/' not found
although when I add this repository in the preferences, the connection is successful.
I finally managed to make it work.
I have to say first that I worked in specific conditions. My environment is Xcode 6 and I decided to work with remote source control in the middle of a project (i.e. with plenty of files in my local computer and no repository).
At this stage trying to push my local files to Assembla via the Xcode Source Control was impossible and Xcode has never been able to commit the files without sending the error message in the title.
I therefore created a new repository in Assembla. I don't know if the next step is mandatory or not but I also created a local admin user in my Mac with the same credentials used to create the Assembla repository.
Then I launched Xcode and instead of selecting my Project, I selected in the left pane the option: Check out an existing project.
Obviously there was nothing to check out since the repository was empty and all the files were on the local machine. But the checkout was successful and Xcode created the folders branches, tags and trunk which was the most important.
Then I copied all of my local files to the newly created local trunk folder.
I selected Preferences in Xcode and added a new remote repository of the form:
https://subversion.assembla.com/svn/
Then I just had to commit all of the files of my project using the Source Control of Xcode. That took some time (there were 697 files with all the images) but this is working well.

How do I add Source Control to an existing project

How do I add Source Control to an existing project?
On some of my projects (originally created in Xcode3) I added Source control in Xcode4. I recollect there was an option to do this.
I now want to do similar for some old projects, but can find no way to do so.
I have searched and the only "solutions" I can find is to create a new project, and copy the original source files.
Unfortunately the way Xcode5 structures a new project is quite different, so this is not straightforward.
Is there a way to do this in Xcode5? I could probably do this in git, or even go back to Lion, but I am sure I am not the only person who wants to resurrect an old project.
Xcode doesn't have an option to create repositories for existing projects. You'll have to create a git repository from the command line. Launch the Terminal application, navigate to your project's directory, and run the git init command to create a git repository for your project.
If Xcode doesn't automatically recognize the repository you just created, open Xcode's Accounts preferences and add your repository from there.

xcode git pull/push crash

When using the xCode IDE when selecting file -> Source Control -> Pull or Push xCode crashes. The only workaround so far found for this is to load the organiser and select each repository and click pull then when then repository name displays cancel the dialog. After repeating this for each repository the normal push/pull options work fine until Xcode is restarted and then the process must be repeated.
This happens the same on all machines (4) at our office. The repositories are on github and there are multiple repositories being loaded in for each project.
We having been using the work around for some time but as we get more repositories this becomes more of an annoyance. Any suggestions welcomed.
I had the same issues with Xcode 4.3 so I have been using Xcode 4.4 and 4.5 for development (I'm not close the delivering yet, so it doesn't matter than I cannot submit my App using these versions yet).
An alternative would be to use an external source control tool; I would recommend SourceTree as it's free and works well. Other than that, there is always the command line.

XCode 4.3 and SVN

I'm new to iOS developing, I haven't used earlier versions of XCode.
Yet I have stored my project on my local hd. Now I want to use some online subversion service.
I cannot seem to find the appropriate options in XCode. The hints that I googled all refer to a menu called SCM which I don't seem to have.
I created a new and empty repository online (webbased) and tried to configure XCode to use it by selecting the "Connect to a repository" menu when xcode starts. After some tweeking in the command line this "connect to a repository" succeeded but afterwards XCode simply closed itself again.
I tried copying the files that belong to my project to the path that I set up to be used with SVN manually. I opened the project in XCode from that path and after adding another file wanted to commit that change but couldn't find how to do that from within XCode.
Now I found that in XCode / Organizer / Repositories / MyProject is listed but has the type "GIT", which is wrong.
Do I have to change the repository type to SVN instead of GIT? If so, how can I?
When you created the project there was an option to put the project under source control. This option creates a git repository and is checked by default.
To use SVN you have to import your project into the SVN repository. (And you probably don't want it to be under git and svn at the same time, so you'll either delete the .git folder or recreate your project without the scm option selected.) Once the project is imported into your repository then you make sure Xcode knows about the repository and you can check the project out.
But really I'd recommend just using Git. It's a modern version control system with lots of nice features (though to do much of anything out of the ordinary requires using the command line) and there are nice project hosting sites for it like GitHub. I don't think SVN compares very well to git.

How do I use Github to create a totally separate project from a previous project?

I have a project on github that my developer and I used to collaborate on an iPhone app. That was my first exposure to version control and I used only a few tasks/commands: push, pull, stash on occasion.
We're now looking into making an OS X version and I'd like to use that previous project as the starting point for this new project.
It seems like this is FORKING the project. But I want to make sure that, once copied, the new (OS X) project has nothing to do with the previous (iOS) project. Is that what forking does? I've usually only heard it in regards to adding features. I've also heard the term cloning, but I believe that refers to making the local copy?
Try this:
Create a blank new project on GitHub
Do a git clone on the latest version of the iOS project to make a new copy of it.
Edit the information in the git config under .git in the copy folder to point to the new project on GitHub.
Forking is what you want. Creating a new project will lose the history from the original project, and will make it considerably more difficult to merge changes back and forth between the two. (Which you're likely to end up wanting to do if the projects are related at all.)

Resources