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.

Assuming no experience with version control systems, just local to live web development. I've been dropped in on a few legacy website projects, and want an easier and more robust way to be able to quickly push and revert changes en masse. I'm currently the only developer on these projects, but more may be added in the future and I think it would be beneficial to set up a system that others can use.

share|improve this question
1  
sooner you start, better for you and project. –  Yusubov Jun 29 '12 at 22:40

4 Answers 4

You have to start somewhere. Might as well just dive in.

$ git init

or

$ hg init

Git documentation

Mercurial documentation

Flip through the beginner pages and pick the one that looks the most sensible to you. Or flip a coin. It doesn't really matter, as either will be infinitely superior to what you're (not) using now.

(Note to others: Please don't turn the comments into a git vs. hg flame war. My point is simply to choose a modern source control system and learn it. Later on, learn the other. They are just tools, yet great tools at that.)

share|improve this answer
6  
+1 for "just do it" –  Wyatt Barnett Jun 27 '12 at 17:42

You will be using some system - whatever it is doesn't matter too much, as long as it isn't VSS. Look at all of svn, git, mercurial, and I'd toss perforce in there too (the trial license is for 20 users, 20 workspaces, unlimited files).

svn and p4 have a central server model, while git and hg are a distributed system. Each has its own advantages in disadvantages.

I'll describe more the idea of a central server system, I'm not as familiar with distributed.

Check in everything into the main line. Make a tag from this initial check in. Tags are a set of files at a certain set of revisions. Make changes in the main line. When you are ready for a release of a set of files, make a new tag for that release with the changes you want, and synchronize the dev, stage, or prod server to that tag.

The 'tag' idea differs between svn and p4 - p4 is as I described it, "a set of files at particular revisions" while svn is "a particular revision" of all files.

That's the basic workflow.

After you've got this workflow down, learn about branching and merging. This would allow you to work on a redesign of the site in one branch while still doing small updates on the same files in the main line.

http://www.perforce.com/customers/white_papers/highlevel_scm_best_practices and http://www.vance.com/steve/perforce/Branching_Strategies.html are a good reads on the subject of branching (even though both perforce biased they have some applicability to any central server approach to version control).

share|improve this answer

Joel Spolsky wrote a nice Mercurial tutorial:

http://hginit.com/

And it does not really matter if you are going to apply version control to a legacy website or the source code of an arbitrary program.

share|improve this answer

You've received many good suggestions in this post. Just add some comments and hope the info help you find a better version control tool.

  1. Considering you are new to version control, I recommend a tool with good UI (more intuitive for beginners)
  2. Provides the feature "web deployment".
  3. Good IDE integration.

I also list some version control tools here for your consideration.

Open Source:

  1. Git
  2. SVN

Commercial:

  1. SourceAnywhere
  2. TFS (Express)
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.