diff --git a/pages/common/git-diff.md b/pages/common/git-diff.md index 69a9f8c15..e042dbf60 100644 --- a/pages/common/git-diff.md +++ b/pages/common/git-diff.md @@ -25,3 +25,7 @@ - Create a patch file: `git diff > {{target_file}}.patch` + +- Compare a single file between two branches or commits: + +`git diff {{branch_1}}..{{branch_2}} [--] {{path/to/file}}`