Problem
I did a lot of commits in one day, leading to my activity graph being kind of distorted, as in the picture below.
I don’t like that other squares are so pale – even if I did 5 commits in a day, the square has the lowest possible saturation.
I want to somehow decrease the amount of commits I have pushed on May 22nd.
The second caveat is that I have worked together with my colleague on the repo in which I did this 22 commits. Because of that, on the remote, there are around 5 my commits, then 1-2 commits of other person, then mine commits again, then some pull request merges etc.
What I thought about
First of all, I will be messing around with remote, so I want to put the subject to a discussion first.
I thought about:
- Changing the owner of some of the commits (I think it’s the easiest) in
git rebase -i
withgit commit --amend --author="Author Name <[email protected]>"
and thengit push -f origin master
. - Rebase and squash some of my commits that are one after the other (I think it’s the best option) and then
git push -f origin master
. - Change the commit date in
git rebase -i
but don’t touch anything else (this will let me to move commits around the graph so I will still have high commits volume but I don’t know how to exactly do that so it would work) withGIT_COMMITTER_DATE="Wed Feb 16 14:00 2011 +0100" git commit --amend --no-edit
and thengit push -f origin master
.
Which solution is the best for this job? Is messing with commit time in point 3 done okay? I mean should I change commit date or author date? Will changing the commit date mess with the order of applying commits?
Personally I think option 2 is the best, but I am not sure. Is there another, better option?