I need to merge two copies of the same stylesheet. I have the original - then made some tweaks...at the same time another developer copied it and was also making tweaks. Now we have two copies that have both been edited, but with different edits.

I need to figure out how to merge them into one stylesheet...hopefully without having to sift through all the code and find the duplicate styles and resolve each conflict manually. Obviously some sort of source control would have avoided this but now it can't be helped.

Anyone know of any tools that could help me? Perhaps something that will highlight all the differences between the two sheets?


  • I had got a dream to start my own firm, nevertheless I did not have got enough of cash to do that. Thank heaven my close fellow proposed to use the <a href="http://goodfinance-blog.com/topics/mortgage-loans">mortgage loans</a>. Thus I took the car loan and made real my old dream. PARKERVERNA24 over 7 years ago

5 answers


Are you on a PC? WinMerge is a good open source Windows tool that compares two files and highlights the differences.


Answered over 9 years ago by Rob Flaherty

I like WinMerge for windows. It is very good. But you might also take a look at ExamDiff (freeware for windows) or KDiff3 (platform independent).

Of course, if you really want to shop around, there are tons of comparison/merge programs available.

Answered over 9 years ago by Abinadi Ayerdis
kemie 247

My personal favorite is DiffMerge. Has less options than winmerge, but I find the interface friendlier.

Answered over 9 years ago by kemie
  • I seconded this, though I think its for mac people only. voidnothings over 9 years ago
  • Never used it, but according to their website, it's "for Windows, Mac OS X and Unix." Doug over 9 years ago

OS X users would find the FileMerge Utility in the Developer tools (install from the installation disk if you didn't already) useful for comparing two files and copying the changes from one into the other.

I'd be more worried about if the changes made actually work together before merging stylesheets though.

One way to find out would be to link both stylesheets to a test document, first in one order, then reverse the order - that way you can see if either stylesheet overrides changes that are essential to keep the site running.

if neither badly breaks the site then you would use a diff engine to see what differences there are between files.

I wouldn't just merge them though - you need to evaluate each change...

Answered over 9 years ago by Tony Crockford
  • What makes this an unhelpful answer please? So I can edit it to be more helpful. Tony Crockford over 9 years ago
  • I thought it was a great answer. +1 back to zero. Doug over 9 years ago

Thanks for all the responses. I used DiffMerge. It did work but the styles weren't close enough to avoid mangling the site... so I had to do a lot of manual changes.

Answered over 9 years ago by Chris Browning