I searched a long time for a solution to develop my web pages on my Workstation and publish the changes via a version control system (vcs) to the webserver. I searched for remote checkout and other keywords and now I found a solution for Bazaar. I only have installed Bazaar on my desktop-PC an not on the server!
Installing Bazaar
If you are familiar with bazaar, you can skip this section an go to Upload-Plugin For Webdesign
sudo apt-get install bzr
I recommend to install bzr-gtk also to get Olive, a GUI for Bazaar.
Initializing
You can read the Mini Tutorial (Bazaar in five minutes), which is a nice introduction, to get started.
The first time you have to introduce yourself with:
bzr whoami "John Doe <john.doe@gmail.com>"
For every new project you have to go through this process, to initialize bazaar and add all files in the working directory:
cd /path/to/myproject
bzr init
bzr add
Upload-Plugin For Webdesign
- There is a tutorial if you have installed Bazaar on your desktop and your server.
- This guide is if you installed Bazaar only on your desktop.
First you have to install the bzr-upload plugin:
sudo apt-get install bzr-upload
Go to your project directory.
You always have three steps from changing your files to publishing:
- Change files
- Commit (Else you will receive the following: ERROR: Working tree “…” has uncommitted changes.)
- Upload
The upload-Process is the only new thing. To upload the first time type the following command (and replace the capitalized words):
bzr upload ftp://USERNAME@DOMAIN/DIRECTORY
So you may have a command like the following:
-
bzr upload ftp://v12345@example.com/html
bzr upload sftp://v12345@example.com/
You will now see something like this:
guru@guru-desktop:/media/www$ bzr upload ftp://v12345@exaple.com/ FTP v12345@example.com password: No uploaded revision id found, switching to full upload Uploading index.php Uploading style/default.css Uploading ... Uploading .htaccess guru@guru-desktop:/media/www$
Bazaar remembers the location, so for the next upload you can go with only
bzr upload
You now will receive something like the following:
guru@guru-desktop:/media/www$ bzr upload Using saved location: ftp://v12345@example.com/ FTP v12345@example.com password: Uploading style/default.css guru@guru-desktop:/media/www$
lifesaver dude 🙂