Last active
April 4, 2020 02:23
-
-
Save the-glima/e19892f44976495b43b68cbf075d0d1b to your computer and use it in GitHub Desktop.
Show commits by a range of time
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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