File differences - itzjac/cpplearning GitHub Wiki

File diff is a term to mark, identify and visualize differences between files. Typical case you wan to identify a single line of difference in a file that a thousand lines, ten thousand lines, a hundred thousand lines. File diff tools will help you find that.

Windows fc

fc /b file.bin file2.bin

Visual Studio devenv

A quick and dirty way of diffing files. As for Visual Studio 2019/2022, the command line provides you with an amazing standalone tool that has no other requirement than installing Visual Studio

devenv diff file2.txt file2.txt

image

P4 Merge and Diff

A more complete stand alone tool that not only helps you diffing files, also merging them. A better fit if you are using a repo.

https://www.perforce.com/products/helix-core-apps/merge-diff-tool-p4merge

git

Its easiest form, you need to have a git repo configured for this command to work.

git diff myfile.txt