AmbroseChapel
AmbroseChapel

Reputation: 12087

Putting a website into Subversion

Say I have a website up and running already. And I want to start using Subversion for source control.

It seems to me that I could just go to the website root and do this:

svn checkout file:///path/to/repo /path/to/website/root/ --force

and it would make the website into a Working Copy of the repository. The --force option is there because normally an svn checkout doesn't overwrite files already there. Then whenever I need to do Step 4 I can just use svn update to change any files which need to be changed.

That seems like an elegant setup and workflow (assuming I handle the security issues caused by a live site also being an svn Working Copy). The update command will certainly be better than export, because it will only change files which need to be changed.

But will there be any problems with the files, permissions etc.? I'm a little nervous to try it.

I tested it on a backup of the site and it put E for 'exists' next to all the files, so I'm not sure it even copied anything across.

Upvotes: 0

Views: 200

Answers (1)

Yury
Yury

Reputation: 691

Making "export" is preferable just because it does not make .svn directories. If you prefer making "checkout" with "update" (you're right, it will update only something that's changed), don't forget to delete all those .svn.

Those hidden dirs are one of best-known vulnerabilities for hacking websites, because it allows seeing you source files' content.

Upvotes: 2

Related Questions