Today I found a very good article about how to compare two text files. This is a handy tool not only for developers, but also good for people who want to quickly find out diference between files.
In the article, it mentioned 2 ways to access this tool. Actually, there is another very handy method to launch the app: Spotlight Search. Just press Cmd+space, then type FileMerge.
The article explains well about the app's usage. Read the article.