Reputation: 3520
How can I insert a commit before the root commit in Git without changing the commits hash? - Is this even possible?
Upvotes: 0
Views: 55
Reputation: 30277
Not really. Your current root commit (which would now be your 2nd commit) might keep all the information the same (tree, author, committer, assuming you can keep the dates).... but it will have a different piece of information: a parent. This forces a new sha1 ID for the revision object.
Upvotes: 3