Yann Dirson <dirson@xxxxxxxxx> writes: >> +EXAMPLE >> +------- >> + >> +Replacements (and before them, grafts) are often used to replace the >> +parent list of a commit. Since commits are stored in a human-readable >> +format, you can in fact change any property using the following >> +recipe: >> + >> +------------------------------------------------ >> +$ git cat-file commit original_commit >tmp >> +$ vi tmp >> +------------------------------------------------ >> +In the editor, adjust the commit as needed. For example, you can edit >> +the parent lists by adding/removing lines starting with "parent". >> +When done, replace the original commit with the edited one: >> +------------------------------------------------ >> +$ git replace original_commit $(git hash-object -w tmp) > > You probably meant "-t commit" - a sign that it's not so trivial to forge ? Mostly a sign that despite my testing efforts, I still fail at cut&paste... But yes, it absolutely needs -t commit. Otherwise the commit would be replaced by a blob, and confusion ensues. -- Thomas Rast trast@{inf,student}.ethz.ch -- 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