Skip to content

Instantly share code, notes, and snippets.

@zeke
Created May 8, 2020 03:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeke/8965806e401028f88d6431c9c92dc454 to your computer and use it in GitHub Desktop.
Save zeke/8965806e401028f88d6431c9c92dc454 to your computer and use it in GitHub Desktop.
git command for creating a diff of recent changes on a specific path (in this case, `content/v3`)
# print output in a manpage-style pager
git whatchanged --since="1 week ago" -p content/v3
# pipe it to stdout
git whatchanged --since="1 week ago" -p content/v3 | cat
# pipe to a file and open that file in an editor
# (vscode highlights diffs, atom does not without a plugin)
git whatchanged --since="1 week ago" -p content/v3 > diff.sh && $EDITOR diff.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment