Skip to content

Instantly share code, notes, and snippets.

@Xion
Last active February 14, 2023 21:39
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 Xion/9928144b1127a1f07f34 to your computer and use it in GitHub Desktop.
Save Xion/9928144b1127a1f07f34 to your computer and use it in GitHub Desktop.
Git command displaying work summary for today
#!/bin/sh
# git-today
#
# Usage:
# * Name it `git-today` and put somewhere inside a `$PATH` directory
# * Invoke as $ git today
LAST_BEFORE_TODAY=$(git log --oneline --until='yesterday 23:59:59' | head -1 | cut -d' ' -f 1)
git --no-pager diff ${LAST_BEFORE_TODAY}..HEAD --stat
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment