olfek
olfek

Reputation: 3520

Insert a commit before the root commit in Git + without changing the commits hash

Similar to this question

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

Answers (1)

eftshift0
eftshift0

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

Related Questions