Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Alias - Show commits in a period of a 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
You can’t perform that action at this time.