w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
why git format-patch generates a patch older than the timestamps of reveision range

A range of commits can contain commits that are older than the first commit due to rebasing.

A range of commits created using <rev1>..<rev2> is defined as the commits that are reachable from <rev2> but excluding those that are reachable from <rev1>. "Reachable" means that a commit can be navigated to using the parent reference that each commit has embedded. So, strictly speaking, a range has nothing to do with dates. See the Git revisions man page for more details.

During a rebase, the changes made in commits are used to create "copies" of those commits. Those "copies" will have the same author and date as the original commits.

Let's say someone develops something for a long time on a local feature branch, then rebases that feature branch on master and pushes. Then the earliest commits that were rebased will probably have earlier dates than the commits that they were rebased onto.





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.