From 43609480d238568ff8d18f83d806a1c25d3c73d1 Mon Sep 17 00:00:00 2001 From: Len Woodward Date: Mon, 6 Jan 2025 11:36:42 -0800 Subject: [PATCH] adds documentation for pint --diff --- pint.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pint.md b/pint.md index ea7f813212..2383028de3 100644 --- a/pint.md +++ b/pint.md @@ -55,6 +55,12 @@ If you would like Pint to simply inspect your code for style errors without actu ./vendor/bin/pint --test ``` +If you would like Pint to only modify the files that differ from the provided branch according to Git, you may use the `--diff=[branch]` option. This can be effectively used in your Continuous Integration environment (like GitHub actions) to save time by only inspecting new or modified files: + +```shell +./vendor/bin/pint --diff=main +``` + If you would like Pint to only modify the files that have uncommitted changes according to Git, you may use the `--dirty` option: ```shell