Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm a solo iOS developer - mostly self taught, but have made several successful apps so far and potentially starting some slightly bigger projects.

What I want to do:

As I'm working on some bigger and more complex apps now, there's some things that I want to do - which from what I gather, repositories are what I should be looking at. Basically, I want to:

  • Online backup of all my code (for now, dropBox works fine)
  • Work on new features of apps, while somehow being able to update/bugfix the older version and have the changes applied to both versions

So, are repositories what I should be looking into? From the brief look I've had, it does look like a bit of a learning curve, with the downside that I could only do work when an internet connection is available (sometimes not the case).

Is there:

any alternative to repositories that would achieve the 'branching'/new features - e.g. is there any way to already achieve this using Xcode and not relying on some server? This would be the easier option in my case.

Alternatively, if there isn't: What repository system would be best for me, and easiest to use (and probably free!)?

share|improve this question
1  
After playing a little with source control system you won't be able to go back. The possibility to just try some code knowing you can come back if needed easily is something too good to not use. –  Arkh Sep 24 '11 at 9:46

3 Answers 3

up vote 4 down vote accepted

Git is the answer to all of your problems--at least the ones you mentioned. There is a little bit of a learning curve to it, but it's free, and ridiculously powerful. Branching is easy (in fact, the recommended workflow is to make a branch for every single feature/bug/etc, and use throw-away branches for integration testing), off-site backup is trivial, and there are a handful of guis that help look at branching and history.

For off-site, there are free options if your source is open, you can pay for private repo hosting, or you can do it yourself by keeping a copy (even your working copy) in dropbox.

Here is a link to the install site: http://code.google.com/p/git-osx-installer/

Here are some articles to get you started:

Update: Xcode v4 has built-in git integration.

share|improve this answer

It's called source control or revision control, and if you're working on code, having a system in place is incredibly useful and important.

First off, there are online source control providers, like unfuddle and github, which provide hosting for code and a lot of other convenience around them. However, they usually cost money if you want to keep your code private (though unfuddle and bitbucket do offer free, private repositories).

That said, git is one of the most popular source control tools out there now, and it's pretty easy to use once you learn the basics. It's also what github and unfuddle use. git doesn't need a central server, so you can have source control with you, even if you're offline. It provides branching, histories, diffing, etc. If you keep your code in a dropbox folder, that's fine too. It's easiest if you have the dropbox client installed on your computer, so that it syncs a folder to your computer.

If you have xcode 4 installed, it should have also installed git into your command line, and the IDE should be integrated with git.

share|improve this answer

What you are looking for is distributed source control. The two most popular solutions at the moment (which happen to be of excellent quality, and FOSS) are git (which is what the linux kernel project uses) and mercurial. In terms of features and usage, they are very similar, they are both excellent, so which one you use doesn't matter much. Git (written in C and shell script) performs a bit better on Unix-likes and has somewhat richer features (in areas you don't need to worry about right now, maybe never); mercurial (written in python) tends to be more non-Unix-friendly.

For both of them, there are free online hosting services; the most popular ones are gitbhub for git, and bitbucket for mercurial. Both offer unlimited free hosting for open source projects, but since they also need to make some money, they impose some limits on other services - with github, you need to pay for private repositories, bitbucket allows private repositories in the free account, but limits the total number of private committers to 5 (which, for a solo developer, is a non-issue).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.