Quantcast
Channel: Version Control How To » Catherine Sea
Viewing all articles
Browse latest Browse all 20

2.4 File Diff

0
0

Show difference between two files in version control system

Diff on two text files
For two text files, we can compare them line by line.

Based on whether the files are local or in the repository, there are three distinct uses of diff:

  • Examine changes between two local files
  • Compare a local file to its repository peer
  • Compare changes between two repository versions

And there are three categories of difference: add, edit and delete. For example, in the following figure, a user deletes the second line, edits the fourth line and add the fifth line.

show difference in version control system

Diff on two binary files
Most binary files can only be compared in hexadecimal and ASCII, such as .JPG, .exe, etc. Luckily, for the most used documentation formats in office, such as Microsoft Word .doc/.docx, Excel .xls/.xlsx, and Adobe PDF, some tool support visual Diff on them.

Integration with 3-rd party Diff tools
Some version control softwares can integrate with 3-rd party Diff/Merge tools. If you are interested in using your favorite Diff tool in a version control system, you may take a look at the online manual.


Viewing all articles
Browse latest Browse all 20

Latest Images

Trending Articles





Latest Images