Skip to content

kirkkala/daily-git-commits

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

daily-git-commits

Shell script for listing git commits for current date or given date range.

Usage

Requirements

A git alias short, add to local ~/.gitconfig

[alias]
  short  = log --decorate --pretty=format:\"%ai | %s%d [%an]\" --abbrev-commit --all

Edit variables

Edit the author and local_projects_directory_root variables in the beginning of script to match your directory structure

Running the script

Without parameters

List all commits for current day:

./daily-git-commits.sh

With parameters

List all commits for specific date range with date parameter(s) in format YYYY-MM-DD

One parameter

Fom given date to current day

./daily-git-commits.sh 2022-03-01
Two parameters

Range between the given dates

./daily-git-commits.sh 2022-03-01 2022-03-06

TODO

  • Make settings configurable (author and local_projects_directory_root)
  • Add input parameter date validation
  • Get rid of short alias requirement
  • Run without parameter to return current day's work

Credit

🙌 High five @tomimikola for the original idea/script.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages