Skip to content

Instantly share code, notes, and snippets.

@ryanlewis
Last active December 20, 2015 09:59
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanlewis/6112001 to your computer and use it in GitHub Desktop.
Save ryanlewis/6112001 to your computer and use it in GitHub Desktop.
Get difference between two commits. Powershell snippet to filter out a list of changed files by extension from git diff --stat
git diff 1.0.2 HEAD --stat=200
git diff 1.0.2 HEAD --stat=500 | where {$_ -Match ".cshtml|.css"} | %{$line=$_.split(" "); write-host $line[1] }
git diff 1.0.2 HEAD --stat=200 | where {$_ -Match ".cshtml|.cs"} | %{$l=$_.split(" "); $file=$l[1]; $file=$file.replace("Umbraco.Site", ""); write-host $file }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment