Last active
October 27, 2017 12:17
-
-
Save karthikax/b4b8487e5aa89e95bf8c16a5b5fe6894 to your computer and use it in GitHub Desktop.
Git commit in the past
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd path/to/git/project | |
export GIT_COMMITTER_DATE="YYYY-MM-DD HH:MM:SS" | |
export GIT_AUTHOR_DATE="YYYY-MM-DD HH:MM:SS" | |
git commit --amend --date=""YYYY-MM-DD HH:MM:SS" | |
# Verify date and time then save. | |
unset GIT_COMMITTER_DATE | |
unset GIT_AUTHOR_DATE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd path/to/git/project | |
export GIT_COMMITTER_DATE="YYYY-MM-DD HH:MM:SS" | |
export GIT_AUTHOR_DATE="YYYY-MM-DD HH:MM:SS" | |
git commit -am "Message" | |
unset GIT_COMMITTER_DATE | |
unset GIT_AUTHOR_DATE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment