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_DATE
is an environment variable to change the committer timestamp.- The
--amend
flag is used for changing things in your last commit. For more info aboutgit commit --amend
see this. - The
--date
flag specifies the author date. - The
date
- which is assigned toGIT_COMMITTER_DATE
and passed to--date
should 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"
Thank you! This was helpful