How to setup SVN repository in XCode? - iphone

I have got to the point with developing iPhone apps that I need a way of managing versions. I have looked into the ways to do this through Xcode and I see that I can either go down the path of using GIT or SVN.
In the past I have used SVN which is the reason I'm more inclined to go down this path (I'm open to using GIT if people feel it is better than SVN). My question is related to the setup of a repository in Xcode.
I have done a fair amount of research and I have found several useful tutorials, however a lot of the seem to be outdated.
My question is 2-fold:
Please can someone advise on the steps to setup a repository through Xcode?
I notice Xcode requires me to set the location of the repository. I'm not sure what to do here, since I don't have my own server. Is there a way I can get around this? Can I setup a local repository somehow (if so how? if not what are my other options?)?
Thanks in advance for any help or advice people can offer.

I think you should go with using GIT. You can create free repository on bitbucket.org
It allows you to create free account which can be used using 5 members of your team. If you want more you need to pay.
Once you are done with creating repo. just check it out on your pc. There are steps given on that site how to do that. Then in the folder which you checked out, create your XCode project. Once your project is ready, add it to the repository. How to do that is also given on bitbucket. Then once you have committed your Xcode project to repository, add that repository to XCode. How to do that is very nicely explained in XCode guide. Just read that.

If you have a home server (or company server), I would use uberSVN. The guided installation is extremely simple. I actually use this to keep all of my Xcode projects under version control.
Steps:
Install an SVN client. (Bottom-right of the page. You can choose 1.6 or 1.7, and your OS via the tabs on the top of the page).
Install uberSVN.

Setting up one's own Subversion or Git server is something developers shouldn't have to fight with, it can be a pain (in terms of sys administration).
If it were me, I'd consider using GitHub if you want to share code publicly (free!) or if you want to share code privately among several of your own computers.
If you're sharing among your own computers, a "micro" account on GitHub runs $7 per month. This is the option I do for my own private & personal projects. So nice to have support built into Xcode.
There are also other third party providers that do both Subversion and Git, such as WebFaction, but this would also cost dollars as well. All of these services have to recoup the costs of doing your system administration. But I think having somebody else do it for you is well worth not having to deal with the hassle.

SVN requires you to use a server to host your repository on. If you're working on an open source project there are webservices that will allow you to host your repository for free (Google Code for instance). Although it's possible to have the server on the local machine, it's better to use GIT in that case. When you create a new project XCode will propose to setup a GIT repository for you, or see this on how to create a new repository for your existing project.

It's actually very easy to setup a local SVN repository on your Mac and reap the benefits of version control without remote/networked repository.
See e.g. explanation here https://stackoverflow.com/a/10039004/226086
Then the path you give Xcode is wherever you set up the repository, say file:///Users/Shared/subversion/ - under Preferences/Accounts/Add Repository, when it asks "Enter repository address".

Related

How to set up GIT as version control tool for a small team

We are using Eclipse with a SVN client plug-in. This client needs a server running; what about Git? We need to work in a LAN environment without internet access. I have read some basic tutorials about using Git with Eclipse. If I got a Java project in my Git repository, how can I share it with my teammate?
Even though you can share your local repositories, I would suggest setting up a server. There many free alternatives like:
gitlab (http://gitlab.org)
gitorious (http://gitorious.org)
gitolite (https://github.com/sitaramc/gitolite)
gitblit (http://gitblit.com/)
But IMO the best one is Atlassian Stash which for small team will cost you only $10.
if you need to share it, you need some way to access it from each other. Bitbucket is great for small teams who need private code.
If you are always using it from inside a LAN one of you should set up a shared section which you can all push your git changes too (a shared folder or shared drive is good enough) but i would recommend using github / bitbucket if possible
from a command line (can probably use it within eclipse too)
git clone file:////192.168.1.100/code
and then you can psuh and pull from 192.168.1.100/code assuming you have write permissions there
if you're coming from subversion to git, you will be faced with the concept of local repository vs shared repository. You will be able to have a local repository on your computer where you can do as many commits as you want and then only push relevant changes to the shared repository (the one that your teammates will be able to see).
Here's an useful link on the possibilities to share a repository: http://www.jedi.be/blog/2009/05/06/8-ways-to-share-your-git-repository/ (ignore the last one, GITHUB, which will require internet access).
In your particular situation I would recommend sharing via SSH or via GIT daemon.
I also really recommend you to take a look on Eric Sink's book here. He's even offering hardcopies for free!
as suggested you can run your own instance of gitolite or gitlab, but for a rudimentary solution i suggest you just check the following answer:
https://serverfault.com/a/113688/181010
basically you can use any folder as a shared repository as long as all users can access the files either locally or via ssh. that link discribes how to tell git to create its file with rights that are appropriate for usage by all users of one unix group (instead of only the single user owning the files).

Is there a plugin for Eclipse that allows two people to edit the same project at the same time?

A friend and I want to work on the same project. Is there a way that we can work on the same project at the same time and have the files stored on Google Drive or Dropbox?
You really want to use a version control system, like mercurial or git. There are lots of hosting options for both of these, like github, bitbucket and others.
Edit: As was observed in a comment, you may also take a look at Subversion or CVS. Whichever works best in your case.
As for Eclipse integration, there are solutions for most systems :
http://javaforge.com/project/HGE for Mercurial
http://www.eclipse.org/egit/ for Git
http://www.eclipse.org/subversive/ for SVN
You can Setup a remote git Server or use bitbucket
In Addition with egit for eclipse :)
I Have done this yesterday and it works pretty well
//again too slow :P

Version Control for School Project

we will be doing a project for our Object Oriented Software Eng. class, and our team consists 4 people, including myself. Our groups were made random, so I do not know their level of skills. Maybe they have never heard of version control. I am looking for a system that will allow us to work together. I have used SVN and Git for a very little time. However, I am not very confident with them. Can you suggest a nice and easy to use system that is compatible with Eclipse or NetBeans IDE? Simplicity is the most important thing and I do not know how to use Git or SVN for a project more than one people. (I have only used them individually)
You need to have some kind of Source control.
If you have used SVN/GIT in your own projects using it in a team is just as easy. SVN is easiest, however even though it is a little harder I would go for mercurial with tortoiseHG, hosted for free at bitbucket.
It will Integrate into the windows UI
Its distributed which will make things smoother and reduce merge issues
You get free private hosting
You can use tortoise SVN or VSS (Visual source safe) to maintain project among multiple peoples. In both tool, you can maintain local copy of project in your PC and commit your changes on server when it completes.
Version control tools comparision : http://en.wikipedia.org/wiki/Comparison_of_revision_control_software
Have a look at Mercurial. It is easy to use and portable (it's written in Python). If you use Windows, you will probably find TortoiseHG useful too, as it provides Explorer extensions for mostly all functions Mercurial supports. There are also many sites that provide free project hosting for this VCS, such as BitBucket. And here is a nice tutorial about Mercurial.
EDIT: I once found a Mercurial plug-in for Eclipse. You can find it by searching in Help > Install Software in Eclipse.
I have used Dropbox as source control in a project once, it worked ok you can also revert to old version of your files which is great, we didn`t have to work in the same files so there was no conflict.
But now that I have gotten used to svn and mercurial I would never use something else. I too would recommend using mercurial with tortoiseHg and a bitbucket acount. I have started using it for smaller project as well, I simply did a repository with all of them in it so I have at least a backup and I am able to revert to an old version if need be.
My recommandation is to avoid sharing a folder using tools like dropbox and use a real source control like mercurial hosted on bitbucket (free for project with less than 4 users).
I'd say using SVN or GIT is a bit over kill for a school project which is likely to not last that long.
Another option would be to use something like DropBox.

What kind of code can I use GitHub for?

What kind of code (what coding languages) can I use GitHub for? Can I use it for websites? Flash? Can I upload images files and other resources?
(I am completely unfamiliar with Git and SVN.)
On git, svn and mercurial:
git, svn, Mercurial are all version control systems. svn was a great improvement over cvs, a commonly used version control system prior to emergence of new VCS. svn like cvs has a client-server model. git and mercurial provides a distributed version control system that does not depend on network as any repository is self contained with all the history and change records. Of course, there are other goodies.
Remember that version control system solves the problem of "the cat ate my code". You can use it to track any kind of development - code, text documents etc.
On github, bitbucket, code.google.com and codplex:
These provide additional goodies on top of what a version control system provides.
They provide you storage for keeping your repository, which you can access and share with the world.
When you share code, you would want to also provide documentation. They provide wiki support for this purpose.
They also provide ticketing / bug management system which can ease a development project.
In short, they provide various tools that can help in project management and development of your code.
Since you are getting to whet the knowledge in some of these areas, following links will be a very useful introductions:
a-visual-guide-to-version-control
intro-to-distributed-version-control-illustrated
You can use GitHub for any source code you want to manage.
But you actually can also use GitHub for your blog(!), the idea being that you would manage your articles and their revisions as you would for a source code base.
(Example: git-blog)
More general documentations: GitHub features (wiki, issue tracking, code review...).
Git does not restrict the kind of files you can track with it... use Github for anything your project needs to track!
Check out http://help.github.com/ for some documentation on how to get started using Git in conjunction with GitHub.
Version control can be applied to ANY file type. From text to images to Flash to whatever. Subversion is my Version control system of choice, and I host my own Subversion server.
As for Git. Well Git is just another version control system. Again, the same rules apply, you can version any file-type. Git-Hub is a public Git server that you can register for and use. You can make your repository public or private.
You cannot however host a site on git-hub. You can do rudimentary blogs, and use the git-feeds to feed your site, but you can't really use it as a traditional web site.

Which SCM and Issue tracker for personal work?

I am planning to bring some "peace" (you may call it organization) to the personal work (small projects, etc.) I do at home.
I would like to use a SCM and an issue tracker which can capture the commits and show them as changesets etc. automatically.
Note that all the above applications are supposed to be for personal usage so would prefer something from FOSS and also they need to be ultra lightweight in terms of the system requirements.
What do you recommend?
EDIT: Following are some of my doubts/concerns:
Git with GitHub looks good. But I am not very comfortable with making my code base public on GitHub. What do you say?
Does GitHub provide an issue tracker? I mean, can I open up an issue on GitHub provided issue tracker and commit against that issue?
Can I have a local SCM (on my laptop) and use some remote issue tracker like FogBugz? But I just don't understand how could a remote issue tracker capture my commits. Any idea?
UPDATE:
I finally went with Mercurial and BitBucket. Working awesome so far!
I would recommend Git with GitHub
I like and use Redmine with the basecamp theme. It supports a couple of version control systems like git, mercurial, svn, ...
For projects that I want to publish I use bitbucket.org and github.com.
I never tried, but would look into git in combination with ticgit ..
If you're going free personal, I'd recommend SVN and Trac. The two integrate very well together with a little bit of configuration. They're also both pretty lightweight.
If you're willing to spend a bit or are working on an open source project, I'd recommend Atlassian's tools Jira and FishEye. I've worked with them as well and have found integration to be very good. They can be a bit hefty though, and I've found the FishEye client to be very AJAX heavy to the point of performance issues.
If you can trust that you'll always be working on your personal projects near your source control server (or if you're doing it all on the same box) then I'd suggest Subversion. I feel the barrier for entry is lower for it than distributed tools like git or mercurial.
I'd look into VisualSVN for your server.
If you're running it all on one box, you can use TortoiseSVN's built-in Repo feature.
My favorite clients are TortoiseSVN and AnkhSVN (if you need VS integration.)
For an issue tracker, a simple story board might be better than a piece of software.
I use org-mode in emacs to track personal projects.
I've used various SCMs for personal work. For really small stuff I still sometimes just run ci -l somefile to start versioning with RCS, because I'm old-school that way. I've happily used Darcs for personal stuff, and I maintain that Darcs is still the easiest to use DVCS out there. These days if I think I'm going to be Open-Sourcing the project I'm likely to use Git, just because that makes putting it on GitHub straightforward.
I also like to use personal projects as an opportunity to experiment with other SCMs that I'm not familiar with, so I'll probably be versioning projects with Bazaar and Mercurial in the future.
In the past, I've used CVS for source control, but I've recently started converting most of my personal projects to use git. However, I don't like the way git works with Visual Studio, so I've been switching to Subversion for my C# projects.
For issue tracking, I've been using Redmine which supports all three SCM methods, though it does better with SVN and git.
Lightweight issue tracking, well, you could use the tracker in drupal, if you consider LAMP easy enough to set up.
If you want to be self-contained, git and mercurial are things you can use without setting up a server at all.
Of course, there's good-old-RCS.
I would have to second using the Subversion and Trac combination. I have this environment setup at work and use it for a distributed team of developers, and I have this environment setup at home and use it for my personal projects. They are open source, very adaptable to your workflow and Trac Hacks has pretty much any mod / hack / plugin you could think of in one form or another.
For very personal things (let's say single-user-mode) I use Tomboy (a simple note-taking application) and Getting Things Gnome. If the project becomes more complex, then I used to switch to Trac with svn or hg backend. For next projects, I'm going to try redmine: seems more clean and hipe than trac (:))