I can’t understand visual diff tool
Think of diff as short for difference, which is a central theme to how Git works. In a project, Git compares two states (such as two different commits) and analyzes the changes between them — like added or removed lines, and files that were created or deleted. The visual diff tool shows these changes in an easy-to-understand way, highlighting differences between two commits.
In the diff tool, you’ll see symbols like +
for lines that were added highlighted in green and -
for lines that were removed in red. You’ll also encounter letters like M
, indicating that a file was modified; D
, meaning a file was deleted; and U
, signifying that a file is untracked, which means it hasn’t been added to the staging area yet, so Git isn’t monitoring its changes.
Using this tool, we can analyze a commit (think of it as a ‘save game’ or a snapshot of our project at a certain period in time). Then look at the changes that was applied to that commit from the previous one in a visual and easy to understand way. From this we can understand the changes made to that commit and change it accordingly