Skip to content

Instantly share code, notes, and snippets.

@vahotm
Last active December 12, 2018 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vahotm/9d61a44d0069db5576087292eb463066 to your computer and use it in GitHub Desktop.
Save vahotm/9d61a44d0069db5576087292eb463066 to your computer and use it in GitHub Desktop.
Write git diff into file on Desktop
git rev-parse --git-dir 1>/dev/null && git add -N . && git diff > "${HOME}/Desktop/$(basename $(git rev-parse --show-toplevel))_$(date '+%d-%m-%Y_%H-%M-%S').diff"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment