Practical explanation
Comparing changes with git diff.
The diff takes two sets of data and generates an output revealing the changes between them. git diff is a multi-purpose Git command that performs a differencing function on Git data sources. These data sources can be commits, branches, files, etc.