99--------
1010[verse]
1111'git replace' [-f] <object> <replacement>
12+ 'git replace' [-f] --edit <object>
1213'git replace' -d <object>...
1314'git replace' [--format=<format>] [-l [<pattern>]]
1415
@@ -63,6 +64,15 @@ OPTIONS
6364--delete::
6465 Delete existing replace refs for the given objects.
6566
67+ --edit <object>::
68+ Edit an object's content interactively. The existing content
69+ for <object> is pretty-printed into a temporary file, an
70+ editor is launched on the file, and the result is parsed to
71+ create a new object of the same type as <object>. A
72+ replacement ref is then created to replace <object> with the
73+ newly created object. See linkgit:git-var[1] for details about
74+ how the editor will be chosen.
75+
6676-l <pattern>::
6777--list <pattern>::
6878 List replace refs for objects that match the given pattern (or
@@ -92,7 +102,9 @@ CREATING REPLACEMENT OBJECTS
92102
93103linkgit:git-filter-branch[1], linkgit:git-hash-object[1] and
94104linkgit:git-rebase[1], among other git commands, can be used to create
95- replacement objects from existing objects.
105+ replacement objects from existing objects. The `--edit` option can
106+ also be used with 'git replace' to create a replacement object by
107+ editing an existing object.
96108
97109If you want to replace many blobs, trees or commits that are part of a
98110string of commits, you may just want to create a replacement string of
@@ -117,6 +129,8 @@ linkgit:git-filter-branch[1]
117129linkgit:git-rebase[1]
118130linkgit:git-tag[1]
119131linkgit:git-branch[1]
132+ linkgit:git-commit[1]
133+ linkgit:git-var[1]
120134linkgit:git[1]
121135
122136GIT
0 commit comments