This is a list of Git aliases that are really handy for me.
This alias logdate
will list entries, one per line.
git config --global alias.logdate "log --pretty=format:'%h %cd [%an] %s' --graph --date=short"
By itself, it will list all commits for the repository. So you usually want to add a limiting parameter. So see only the last five entries:
git logdate -5
This alias logweek
will list all commits from the past week.
git config --global alias.logweek "log --pretty=format:'%h %cd [%an] %s' --graph --date=short --since=1.week"
This one does not need to be augmented often. One case is displaying the commit history for the current directory.
git logweek .
* 92f86cd 2015-12-04 [Paul Glezen] Initial commit.
For those really busy days, the logday
alias shows all the commits
in the last 24 hours.
git config --global alias.logday "log --pretty=format:'%h %cd [%an] %s' --graph --date=relative --since=1.day"
Since the usual date format is superfluous, it provides more detail on the time.
git logday
* 92f86cd 5 hours ago [Paul Glezen] Initial commit.