Jump to content
Man In Tan

Recommended version control software or hosting?

Recommended Posts

I'm trying to start a collaborative project, but I really don't know what all I need to do so. Obviously, we need a way to communicate, and a way to manage our code. As far as conversing, a forum should do nicely, but managing code from multiple users will be a bit more challenging.Version control seems to be a popular option, but when I research it, I end up getting confused. I'm on a low budget, so I can't really afford to pay for version control. What would you recommend?I require at least the following features:

  • It must be free
  • It must be accessible via a sub-domain of our new domain, for branding and search engine related reasons
  • -> If it comes with hosting, which would be preferable, I need to be able to apply my own sub-domain
  • -> If I have to host it myself to achieve this, it must be written in PHP, as that's all I have access to on my server for the time being

Preferably, I want something that's easy to use, but it's not a big deal if it isn't. I'll find the appropriate documentation. Any suggestions would be greatly appreciated.

Share this post


Link to post
Share on other sites

Since version control systems (VCS) need direct access to the files, they are not typically tied directly to any web naming, whether that's a domain, subdomain or something else. I say "directly", because with the right organization, you can make it appear as if they're somehow tied to it - do so indirectly if you will.You need to think about this from a file system perspective first, and expand from there... how do you do things when you're alone? You have local copies of files, and you upload those over FTP to your host. You then make further changes locally, ideally you test before you upload, and finally upload the new files.Here's the thing... VCS can only deal with files up to the moment before you decide to upload them.You may ask "But where's the point then? My team mates work on different computers, and we all need to be up to date...". There are two different answers to this question, depending on the kind of VCS you're after:- Centralized: You all share the same file system over a network. That is, you all connect to a single remote server, and that remote server's file system is the authoritative one. You check up with updates from it, you commit changes to it, and in cases of attempts at modifying the same file, you could (potentially) merge changes from both parties, or resolve conflicts in favor of one commit.- Decentralized/Distributed: Each team member gets their own file system, where they do whatever changes they want, independently from each other. One of these file systems (not necessarily one owned by a member of the team: could be a server like in the centralized system) is agreed to be the authoritative file system, to which everyone can merge their file system, and resolve conflicts at that point (again, either with a merge, or with one version being favored over another). Every team member can, at any point (with permission), check for updates from an arbitrary remote file system (either owned by a team member or the authoritative one).No VCS "comes with hosting" - you can always install a client and/or server on your computer, and not bother with any hosting. But most VCS have a host that offers them. The "host" in this case is simply someone who lends you a file system that your VCS program can connect to. There are both free and paid ones.SourceForge is a popular free hosting platform for open source projects that lets you use systems like SVN, CVS, Git, Mercurial, and others. GitHub is probably the most popular Git hosting service, and they (again) offer free space for open source projects, and in addition to SourceForge also let you host non open sourced (i.e. "private") projects for a fee.

Share this post


Link to post
Share on other sites

Thanks for the explanation. Maybe version control isn't right for this project. Maybe I should just use a shared file manager, that backs up old versions of files (just in case) until the current set of files is deemed stable. Maybe with a check in/check out system so multiple people don't work with the same file and one doesn't overwrite the other's edits? Something like a file manager will be easy to find, and I can make the necessary adjustments from there.Sourceforge is a great example of what I was talking about with the sub-domain thing. I know that the filesystem and DNS are completely independent. However, with Sourceforge, projects can be accessed via "projectname.sourceforge.net", while I want a project to be accessible from "projectname.ourdomain.tld". I guess this isn't an issue if I just use a file manager.I actually don't know much about the file transfer protocol. I tried to implement it between two local computers, but I couldn't get it to go well. The computer I was sitting at was able to access and download files from a section of the other computer's file system (not the section I actually needed access to, by the way), but uploading was not possible. I found it very odd. I'll figure it out one of these days when I have time, but for now, I use basic HTTP over the local intranet. Sad, huh? I probably just need to install different software on both computers. Anyway, thaks again!

Share this post


Link to post
Share on other sites

A centralized VCS serves exactly as a single file manager that ensures you won't overwrite each other's stuff and/or lets you merge/resolve conflicts and/or restore previous versions of a file (or the whole thing).If certralized is what you want, try SVN. TortoiseSVN is the client I'd reccomend (which can create a file system for itself; You'll only need a server when you want remote devices join into your file system). I suggest you try it out on your computer first to get a feel of the workflow.Note that when I say "file system", I don't mean "file system" as in "file manager"/Winbows, I mean it as in "a set of files and folders".

Share this post


Link to post
Share on other sites

This topic is very prophetic since I've been thinking about it lately. Based on this topic, a DIY VCS seems well within a coder's ability given php and myqsl skills and access to a server. Can it be that simple?

Share this post


Link to post
Share on other sites

A "real" VCS has a lot of other features, which I don't mention, because they differ from one VCS to the next. Most have "tags" (a specifically targeted snapshot; typically a public release of the software), SVN has the ability to automatically replace a targeted text with an SVN revision, allowing easier tracking of pre-release versions, Git differentiates an author from the one who made the commit, allowing easier tracking of contributions from external parties, etc.Even if you do manage to create all the features, using PHP and MySQL to manage the files would be far less efficient, since items pass over HTTP, the PHP/MySQL codes, and then the PHP and MySQL engines, unlike normal VCS where things go from HTTP directly to the engine.Creating a basic VCS using a compiled desktop language (C/C++), without any networking abilities isn't that hard if you can convince yourself to pass through the VCS for everything, and don't mind it being a little slow. It's the rest (efficiency, networking, etc.) that's harder, especially any stuff that the VCS is supposed to detect without you consulting with it.

  • Like 1

Share this post


Link to post
Share on other sites

What open source VCS look most promising?

Share this post


Link to post
Share on other sites

In terms of popularity - SVN for centralized, Git for decentralized. Those are also the only two I've used. I've also heard nothing but good things about Mercurial, but haven't used it myself, and it's less popular than Git.

  • Like 1

Share this post


Link to post
Share on other sites

That's more than enough for right now. Thank you very much boen robot.

Share this post


Link to post
Share on other sites

I strongly recommend git, it's really easy to use. There's a good introduction course at http://www.codeschool.com/courses/try-git For hosting, you could do it yourself with gitolite, but I don't think it's worth it. Github is free for open source, and Bitbucket is free even for private repositories (up to a limit of users or space, I think).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×