Reputation: 2101
I can commit and push something in the past using:
git commit --date="25 day ago" -m "some message"
I would like to generate a command that takes the parameter --date="___ day ago"
as a random date in the last 360 day ago
interval.
How can I approach the problem?
Upvotes: 0
Views: 573
Reputation: 13507
If you are using bash, you can:
git commit --date="$(( $RANDOM % 360 )) days ago" -m "some message"
Upvotes: 2