Skip to content

Instantly share code, notes, and snippets.

@the-glima
Last active April 4, 2020 02:23
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 the-glima/e19892f44976495b43b68cbf075d0d1b to your computer and use it in GitHub Desktop.
Save the-glima/e19892f44976495b43b68cbf075d0d1b to your computer and use it in GitHub Desktop.
Show commits by a range of time
# Show commits in a period of a time
gitCommits() {
period1=${1:-1}
period2=${2:-day}
if [ -z "$1" ]; then
echo "You can also specify the period, like: gcommit 1 week, or 2 day..."
fi
git log --oneline --after={$period1.$period2.ago} --no-merges --author="Gabriel"
}
alias gcommit=gitCommits
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment