Changing a commit date info
My country is under a daylight saving time period and not all my commits are made during the morning/afternoon. Because I commited after 11:00 PM - which, given the local DST, was after 00:00 AM - my 100+ days commit streak got broken - which made me very unhappy.
To understand more about author X committer see this.
The author is the person who originally wrote the code.
git commit --amend --date "date"
This can be enough to solve broken-github-streak issues.
The committer is assumed to be the person who committed the code on behalf of the original author.
GIT_COMMITTER_DATE="date" git commit --amend --date "date"
GIT_COMMITTER_DATEis an environment variable to change the committer timestamp.
--amendflag is used for changing things in your last commit. For more info about
git commit --amendsee this.
--dateflag specifies the author date.
date- which is assigned to
GIT_COMMITTER_DATEand passed to
--dateshould be like:
<day of the week>, <day of the month> <month> <year> <hour> <time zone>, eg:
git commit --amend --date "Sun, 18 Oct 2015 12:40:00 -0300"