6

Using Subversion for web development

 3 years ago
source link: https://help.dreamhost.com/hc/en-us/articles/216109237-Using-Subversion-for-web-development
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Using Subversion for web development

Subversion has been removed from the DreamHost panel. If you had previously configured Subversion on your domain, it will continue to function normally.

Overview

Now that you have imported your files to the repository, you might be wondering how to leverage version control to your advantage. The first thing you need to do is set up a Development area and a Live area.

For example:

  1. Log into your server via SSH.
  2. Backup your site by running the following command:
    [server]$ tar -cvf yourwebsite.tar example.com/
  3. Checkout your repository to your development area:
    [server]$ svn checkout https://example.com/yourProject ~/dev.example.com
  4. Checkout your repository to your live area:
    [server]$ svn checkout https://example.com/yourProject ~/example.com

Publishing from Dev to Live

Using your dev site at dev.example.com, you can now make any necessary changes. Once all the changes are complete in your Dev area, you can then make them Live.

  1. Go to your dev directory:
    [server]$ cd dev.example.com
  2. Commit your changes:
    [server]$ svn commit -m "Your change log notes"
  3. Go to your live directory:
    [server]$ cd ~/example.com
  4. Update the Live site:
    [server]$ svn update

You may see the following error when updating from your dev site:

Conflict discovered in <filename>
Select: (p) postpone, (df) diff-full, (e) edit,
        (mc) mine-conflict, (tc) theirs-conflict,
        (s) show all options:

If you type in the letters tc and click 'Enter' on your keyboard, all changes made in your Dev site are updated to your Live site. View the following page for further details:

Your changes are now live.

See also

Did this article answer your questions?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK