Last active
December 10, 2015 18:28
-
-
Save gorenje/4474747 to your computer and use it in GitHub Desktop.
what i did last month
This file contains hidden or 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
====> .gitconfig | |
[alias] | |
lsloglastmonth = log --pretty=format:"%ci\\ %C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]%Creset" --decorate --after='last month' --before='today' --no-merges | |
====> .bashrc | |
function _funct_gitlog_last_month | |
{ | |
local lastmonth=`gdate '+%Y-%m-01' --date '1 month ago'` | |
for n in */.git | |
do | |
local dirname=`dirname $n` | |
cd $dirname 2>/dev/null >&2 | |
echo | |
echo "=========> ${dirname}" | |
git lsloglastmonth --since="${lastmonth}" --author="$(git config --get user.name)" | cat | |
cd .. 2>/dev/null >&2 | |
done | |
if [ -d .git ] ; then | |
echo | |
echo "=========> $(pwd)" | |
git lsloglastmonth --since="${lastmonth}" --author="$(git config --get user.name)" | cat | |
echo | |
fi | |
} | |
alias gitlog-last-month=_funct_gitlog_last_month | |
===> usage | |
gitlog-last-month | grep -v "2013-01" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment