Conversation
Notices
-
Discovered a "new" feature that was introduced into #git 1.6.5, 8 years ago.
https://git-scm.com/docs/git-replace
It's like grafts, except it's more generic and it can be transmitted between repos!
Instead of a line <commitid> [<fakeparent0> ... [<fakeparentn>]] in .git/info/grafts for just manipulating the ancestry of a commit, you can "now" put an object, any type of object, in refs/replace/<sha1toreplace> and git will use that instead of the real object.
git-replace --graft <blah> <bluh> does the same using this mechanism as adding a line <blah> <bluh> to .git/info/grafts would.