Is there any easy way to postpone GitHub commits?
It would be also nice if these commits will go one after another in 1 hour.
Let's say if I have 5 commits, the first one should appear at 10am, second at 11am, third at 12pm and so on.
Changing Git DatesYou can change the author date of a given commit by passing the --date flag to git commit .
Just do git commit --amend --reset-author --no-edit . For older commits, you can do an interactive rebase and choose edit for the commit whose date you want to modify.
In the same way you don't end an email subject line with a period, your Git commit subject line does not need a period either (plus with a 50 character limit you'll want to save every character you can).
There are actually two different timestamps recorded by Git for each commit: the author date and the commit date. When the commit is created both the timestamps are set to the current time of the machine where the commit was made.
You can use commit --date argument:
git commit -m "message" --date "Tue Apr 28 23:00:00 2015 +0300"
UPD: there is also pretty cool script for shifting old commits date (you need Perl to run it): https://raw.githubusercontent.com/gitbits/git-shift/master/git-shift
perl git-shift +5h 2e6fd0a9dc98403c4fca638e411b3451cbc66a89
UPD2: You can create custom alias in order to shift all new commits automatically. In order to do that, put the following line into your ~/.bashrc file
alias future-commit='git commit --date "$(date -v +4H)"'
or
alias future-commit='git commit --date "$(date -d +4hours)"'
reload terminal and now you will be able to commit with +4 hours shift:
future-commit -m "future commit"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With