When I commited my work, the pc date was 02/13/2014, but the correct date was 01/13/2014. Is possible the change commit date to the correct date?
For all commits where you want to change the date, replace pick by edit (or just e ), then save and quit your editor. The first date is the commit date, the second one is the author date. Repeat the process until you amend all your commits. Check your progression with git status .
If you've already created a fresh commit, you'll want to use git rebase -i to squash your commit on top of the old one. After you've made this change locally, and verified your commit looks the way you want it to, you'll have to git push --force to overwrite history on the Github remote.
If it is your latest commit:
git commit --amend --date="Wed Jan 13 12:00 2014 +0100"
If it is for example your 5th last commit, you can do an interactive rebase and edit the commit:
git rebase -i HEAD~5
<find the commit and change 'pick' to 'e', save and close file>
git commit --amend --date="Wed Jan 13 12:00 2014 +0100"
git rebase --continue
Keep in mind that this rewrites history.
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