Created
September 8, 2023 09:16
-
-
Save TurRil/33863755b810bac3504ff85212592b16 to your computer and use it in GitHub Desktop.
Github log pretty print with stats and formatting
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
# --since='last month' | |
echo "commit id|author|date|comment|changed files|lines added|lines deleted" > github_log.csv | |
git log --after='2022-1-1' --date=local --all --pretty=format:'@%h|%an|%ad|%s|' --shortstat --no-merges | tr "\n" " " | tr "@" "\n" >> github_log.csv | |
sed -i 's/ files changed,/|/g' github_log.csv | |
sed -i 's/ file changed,/|/g' github_log.csv | |
sed -i 's/ insertions(+),/|/g' github_log.csv | |
sed -i 's/ insertion(+),/|/g' github_log.csv | |
sed -i 's/ insertions(+)/|0/g' github_log.csv | |
sed -i 's/ insertion(+)/|0/g' github_log.csv | |
sed -i 's/ deletions(-)//g' github_log.csv | |
sed -i 's/ deletion(-)//g' github_log.csv | |
sed -i 's/|\s\s\s/|/g' github_log.csv | |
sed -i 's/|\s\s/|/g' github_log.csv | |
sed -i 's/|\s/|/g' github_log.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment