https://github.com/ashutoshvarma/git-date-commit
https://github.com/ashutoshvarma/git-date-commit
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ashutoshvarma/git-date-commit
- Owner: ashutoshvarma
- License: mit
- Created: 2020-09-30T14:20:44.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T16:21:58.000Z (over 4 years ago)
- Last Synced: 2024-12-28T00:42:52.498Z (5 months ago)
- Language: Shell
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git Date Commit
Simple bash script to batch commits for given date range.## Usage
```
Usage: gdc.sh [optional] -x COMMAND -s START_DATE-x COMMAND command/script to execute before every commit. Any
--execute 'eval' compatible command is supported. Also you can
use day and date placeholders.-s START_DATE date to start commits. (all GNU 'date' compatible dates
--start string are supported. Example-'2020/08/04')-e END_DATE date of last commit.
--end-c MSG commit message. Placeholders for day and date is supported.
--commit_msg-n NUMBER no of commits per day.
--commit_count-q no progess bar.
--no_progressbar-v version
--version-h help message
--helpPlaceholders:-
Two placeholders for current processing date '${date}' and current day count
'${day}' and current day commit number '${commit_count}' are provided for
use in COMMAND and COMMIT_MSG. NOTE that placeholder syntax is exactly similar
to bash variable so make sure to use SINGLE QUOTES while assigning them in shells.Examples:-
Run custom script with date and day as args before commits ranging from date
2020/08/04 to 2020/12/31.
$ gdc.sh -s '2020/08/04' -e '2020/12/31' -x './myscript.sh ${date} ${day}'
Note the single quotes in -x to prevent variable substitution for placeholders
```