Re: git rebase -i without altering the committer date

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On April 20, 2016 at 13:37:01, Junio C Hamano (gitster@xxxxxxxxx(mailto:gitster@xxxxxxxxx)) wrote:
> Shaun Jackman writes: 
> 
> > I'd like to insert a commit between two commits without changing 
> > the committer date or author date of that commit or the subsequent 
> > commits. I'd planned on using `git rebase -i` to insert the 
> > commit. I believe it retains the author date, but changes the 
> > committer date to the current time. I've seen the options 
> > `--committer-date-is-author-date` and `--ignore-date`, but I don't 
> > believe either of those options does what I want. If no such 
> > option currently exists to leave the committer and author date 
> > unchanged, is there any chance that this functionality could 
> > please be implemented? 
> 
> You can mark the commit as "edit", use "git commit --amend" when 
> "rebase -i" stops and gives control back to you, and say "rebase 
> --continue". That way, you can use your favourite trick to lie 
> about committer date (or identity or other aspects) when running 
> "git commit --amend" and its effect will be left in the resulting 
> history, I would think. 

Thanks for the suggestion, Junio. That would retain the committer date for the commit being inserted. I believe that the subsequent commits would have their committer date modified to the current time by the `git rebase --continue`.

Cheers,
Shaun



--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]