I have a problem with a git repository that I'm hoping you folks can help me with. If you folks have the time here's my situation: ============================ 2 persons developing together (Fred and Barney if you will). Fred's repository is the canonical repository, Barney cloned from Fred, and periodically has Fred pull Barney's work, and if it passes muster, merge it into Fred's master. Barney is good about pulling Fred's master into his own master periodically and basing his work off the master branch. Fred starts with source code that is not his own (or under version control), but that he needs to clean up with help from Barney. Now Fred is a conscientious Linux user and uses ntp to make sure his system date is in sync within a couple of milliseconds of UTC. Barney (that would be me) is a slacker too lazy to run ntpclient, or ntpd to make sure he's also in sync with UTC. In point of fact, Barney's clock says he's 6 hours earlier than Fred (i.e., when Fred's system clock say it's 6 p.m., Barney's clock say it's noon.). Git has no problem keeping track of the order in which commits occurs as gitk clearly shows. But git log has a problem since it's ordering by time stamps, so it shows Fred's initial commit occurring *After* some commits pulled from Barney's repository. What's really bugging Fred and Barney is that Fred has received a new updated version of the original source code he was tasked to clean up. What Fred and Barney would like to do is to make a branch of the repository from the base of master, and then apply the history of master onto this branch. For personal reasons, they don't want to simply rebase master off this branch. To be a little more specific, what Fred and Barney would like to do is to branch master's base node (not HEAD), call it "updated_original_source_code", unroll the "updated" original source code in this branch, commit the diffs from the original source code to "updated" original source code, and then apply the history of master by using git-format-patch and git-am to generate a sequence of patches to apply onto updated_original_source_code branch. The problem is that the patches generated by git-format-patch are generated by timestamp, and since slacker Barney's timestamps are off by 6 hours, some of the patches would be applied in the wrong order thus borking the operation. Have you any suggestions for how to get around this problem? I'm sure I can't be the only person to have used the wrong system clock time. Here are the git commands Fred is attempting to use: # Branch the *base* of master git checkout -b updated_original_source_code 345678 cp ../updated_source_code.tar.gz . tar zxvf updated_source_code.tar.gz # Commit all changes from original_source_code # to updated_source_code git -a -m "Updated original source code" # Now apply the history of master onto this branch: # This is where they get hosed because the timestamps # from Barney's commits are wrong, and hence the # generated patches are out of order. git format-patch 345678..master | git am -k -3 --Rod P.s. Would a diagram help? -- 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