Compare local and remote files for differences
Dreamweaver can work with file comparison tools (also known as “diff tools”) to compare the code of local and remote versions of the same file, two different remote files, or two different local files. Comparing local and remote versions is useful if you’re working on a file locally and you suspect the copy of the file on the server has been modified by someone else. Without leaving Dreamweaver, you can view and merge the remote changes into your local version before putting the file to the server.
Comparing two local files or two remote files is also useful if you keep previous, renamed versions of your files. If you’ve forgotten the changes made to a file from a previous version, a quick comparison will remind you.
Before you start, you must install a third-party file comparison tool on your system. For more information on file comparison tools, use a web search engine such as Google Search to search for “file comparison” or “diff” tools. Dreamweaver works with most third-party tools.
Specify a comparison tool in Dreamweaver
If you use |
Select the following file |
|---|---|
FileMerge |
/usr/bin/opendiff (or /Developer/usr/bin/opendiff) |
BBEdit |
/usr/bin/bbdiff |
TextWrangler |
/usr/bin/twdiff |
Compare two remote files
You can compare two files located on your remote server. You must define a Dreamweaver site with remote settings before you can accomplish this task.
Compare a local file to a remote file
You can compare a local file to a file located on your remote server. To do this, you must first define a Dreamweaver site with remote settings.
In the Files panel, right-click a local file and
select Compare With Remote from the context menu. The file comparison tool starts and compares the two files.
Compare a remote file to a local file
You can compare a remote file to a local file. You must define a Dreamweaver site with remote settings before accomplishing this task.
Compare an open file to a remote file
You can compare a file open in Dreamweaver to its counterpart on the remote server.
In the Document window, select File >
Compare with Remote. The file comparison tool starts and compares the two files.
You can also right-click the document tab along
the top of the Document window and select Compare with Remote from
the context menu.Compare before putting files
If you edit a file locally and then try to upload it to your remote server, Dreamweaver will notify you if the remote version of the file has changed. You have the option of comparing the two files before you upload the file and overwrite the remote version.
Before you start, you must install a file comparison tool on your system and specify it in Dreamweaver.
