-
-
Save oliverpool/c6c0b9064a8f39bbf5ee9828d2696e77 to your computer and use it in GitHub Desktop.
You can then type git timetrack, git timetrack "1 day", git timetrack "1 month" --reverse (the arguments are positional, so the duration is required in this case) in any git repository!
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
# add it to your ~/.gitconfig as an alias: | |
[alias] | |
timetrack = "!f() { \ | |
git --no-pager log \ | |
--date=iso \ | |
--since="${1-2 months}$" \ | |
"${2}" \ | |
--date-order \ | |
--full-history \ | |
--all \ | |
--pretty=tformat:'%C(cyan)%ad%x08%x08%x08%x08%x08%x08%x08%x08%x08 %C(bold red)%h %C(bold blue)%<(22)%ae %C(reset)%s'; \ | |
}; f" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment