From: Erik Cervin Edin Date: Mon, 03 Jan 2022 10:14:02 GMT Subject: Re: Git Diff feature request Message-ID: In-Reply-To: <83d398ce-caba-34f7-3727-3e7f5d396127@gmail.com> On Mon, Jan 3, 2022 at 8:43 AM Nick Gearls wrote: > > When you want to compare 2 versions of a repo you don't own, you don't have the option to apply a formatting standard ... You may try https://git-scm.com/docs/diff-options#Documentation/diff-options.txt---word-diff-regexltregexgt printf 'if (xyz) biz()\n' > bar git commit -m 1 bar printf 'if (xyz)\n biz()\n' > bar git commit -m 2 bar git diff --word-diff-regex='[^[:space:]]' HEAD~ yields a diff with differences hidden diff --git a/bar b/bar index 49d380e..05c8e60 100644 --- a/bar +++ b/bar @@ -1 +1,2 @@ if (xyz) biz() But from gits perspective, the files are different and the lines are different. This is the reason having an adhering to a formatting standard is advised, and something IMHO every serious project should adhere to.