Git Diff Viewer
Paste and visualize git diff output — highlighted additions, deletions, and context with file and line tracking.
About Git Diff
Git diff shows the differences between two states of a repository. The output uses unified diff format: lines starting with + are additions (shown in green), lines with - are deletions (shown in red), and unchanged context lines (shown in gray) provide surrounding context. The @@ markers show the line numbers in the original and modified files.
Common git diff commands: git diff (unstaged vs staged), git diff --staged (staged vs last commit), git diff HEAD (all changes vs last commit), git diff main..feature (between two branches), git show COMMIT (what a commit changed). Understanding diff output is essential for code reviews, debugging, and understanding what changed between versions.