Last active
July 31, 2018 05:45
-
-
Save SametAylak/32db07d563823e1f119f0fc39c2acfad to your computer and use it in GitHub Desktop.
This script shows your commits of today. this script searches all subfolders/repos
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
| #!/bin/bash | |
| YELLOW="\\033[1;33m" | |
| RED="\\033[0;31m" | |
| NC="\\033[0m" | |
| PARENT_DIR=$(pwd) | |
| find "$PARENT_DIR" -type d -name ".git"| while read -r line; do | |
| TARGET_FOLDER=$(cd "$line/.." || exit; pwd) | |
| TARGET_FOLDER_NAME=$(basename "$TARGET_FOLDER") | |
| cd "$TARGET_FOLDER" || exit | |
| echo -e "${RED}$TARGET_FOLDER_NAME${NC} | ${YELLOW}Commits of Today${NC}" | |
| git log --reverse --pretty=format:"%Cred%h%Creset %C(bold blue)%an%C(reset) - %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset" --no-merges --branches=* --date=local --after="yesterday 11:59PM" --author="`git config --get user.name`" | |
| cd "$PARENT_DIR" || exit | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment