Skip to content

Commit 4e4b125

Browse files
chriscoolgitster
authored andcommitted
Documentation: replace: describe new --edit option
Signed-off-by: Christian Couder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent ab77c30 commit 4e4b125

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

Documentation/git-replace.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ SYNOPSIS
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

93103
linkgit:git-filter-branch[1], linkgit:git-hash-object[1] and
94104
linkgit: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

97109
If you want to replace many blobs, trees or commits that are part of a
98110
string of commits, you may just want to create a replacement string of
@@ -117,6 +129,8 @@ linkgit:git-filter-branch[1]
117129
linkgit:git-rebase[1]
118130
linkgit:git-tag[1]
119131
linkgit:git-branch[1]
132+
linkgit:git-commit[1]
133+
linkgit:git-var[1]
120134
linkgit:git[1]
121135

122136
GIT

0 commit comments

Comments
 (0)