DEV Community

Discussion on: Git: Cheat Sheet (advanced)

Collapse
 
vadorequest profile image
Vadorequest

Improved version:

# useful for daily stand-up
# See https://dev.to/maxpou/git-cheat-sheet-advanced-3a17
git-standup() {
    AUTHOR=${AUTHOR:="`git config user.name`"}

    since=yesterday
    if [[ $(date +%u) == 1 ]] ; then
        since="2 days ago"
    fi

    git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --since "$since" --author="$AUTHOR"
}
Collapse
 
maxpou profile image
Maxence Poutord

interesting! 😃