Geoff Wilson / Digital Marketing / November 23rd, 2007

Merging Files in Dreamweaver

One of our great design contractors, Paul Traylor, recently shared this tip with the rest of our designers.  I thought it may be helpful to other designers as well, so I wanted to share it here:

Have you ever manually merged files with a file comparator through Dreamweaver?  If not, it’s easy and a good thing to have in your bag of tricks.

Here’s a link to a how-to article:
http://www.adobe.com/devnet/dreamweaver/articles/compare_utilities.html

Here’s a summary:

1) Download a file comparison (diff) application.  Adobe suggests Winmerge for Windows or XCode for Mac (see the above article for links). I am a Mac user and I use TextWrangler (http://www.barebones.com/products/textwrangler/index.shtml).

2) Next you have to configure DW to use that application to compare the files. You need to point DW to it in DW’s Preferences under “FileCompare”.

3) Now, in DW if you select two files in the site’s “Files” box and right click there should be a “Compare Local Files” option.

4) Select that. It will open the two files using the diff app you specified. Your diff app should show you the two files one next to the other and flag all the diff’s between them. It should allow you to go through the files variation by variation and either merge the variation one file or the other (your choice). For example, say two developers made modifications to the same CSS file and now need to merge them together. Take one developer’s css file, let’s call it mainStyles.css, and rename it mainStylesPAUL.cssand throw it in the css folder with the other developer’s copy of mainStyles.css.  Now use DW to do a compare and see and/or merge the diffs between the two files.

Hope that helps someone.  If nothing else it will give you a healthy respect for what CVS has to do to merge files.