Skip to content

Want all your commits to have dates within specific schedules, like `9am to 5pm on weekdays`? That's what this tool does for you.

Notifications You must be signed in to change notification settings

conradkleinespel/delay-git-commit

Repository files navigation

Delay Git commits

Want all your commits to have dates within specific schedules, like 9am to 5pm on weekdays? That's what this tool does for you.

Usage

# Setup
git clone https://github.com/conradkleinespel/delay-git-commit.git ~/delay-git-commit
env -C ~/delay-git-commit npm install
ln -s ~/delay-git-commit/index.js /usr/local/bin/dgc

# In a repository for which you want to enforce usage of delay-git-commit
git config core.hooksPath githooks
cp ~/delay-git-commit/githooks/pre-commit githooks/pre-commit
cp ~/delay-git-commit/githooks/pre-push githooks/pre-push

# Set your schedule, using cron strings to define when your commits should be made
# For example, 9am to 5pm on week days
dgc timeslot --add --days "1-5" --start "0900" --end "1700"

# Commit now with a date within a future timeslot of your choice
# Any options from "git commit" will work
dgc commit -m "My commit message"

# Push commits for which the date is in the past to the upstream tracking branch
# Any options from "git push" will work
dgc push

About

Want all your commits to have dates within specific schedules, like `9am to 5pm on weekdays`? That's what this tool does for you.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published