Documentation: fix typos and spelling in replace documentation
[git] / Documentation / git-replace.txt
1 git-replace(1)
2 ==============
3
4 NAME
5 ----
6 git-replace - Create, list, delete refs to replace objects
7
8 SYNOPSIS
9 --------
10 [verse]
11 'git replace' [-f] <object> <replacement>
12 'git replace' -d <object>...
13 'git replace' -l [<pattern>]
14
15 DESCRIPTION
16 -----------
17 Adds a 'replace' reference in `.git/refs/replace/`
18
19 The name of the 'replace' reference is the SHA1 of the object that is
20 replaced. The content of the 'replace' reference is the SHA1 of the
21 replacement object.
22
23 Unless `-f` is given, the 'replace' reference must not yet exist in
24 `.git/refs/replace/` directory.
25
26 Replacement references will be used by default by all git commands
27 except those doing reachability traversal (prune, pack transfer and
28 fsck).
29
30 It is possible to disable use of replacement references for any
31 command using the `--no-replace-objects` option just after 'git'.
32
33 For example if commit 'foo' has been replaced by commit 'bar':
34
35 ------------------------------------------------
36 $ git --no-replace-objects cat-file commit foo
37 ------------------------------------------------
38
39 shows information about commit 'foo', while:
40
41 ------------------------------------------------
42 $ git cat-file commit foo
43 ------------------------------------------------
44
45 shows information about commit 'bar'.
46
47 OPTIONS
48 -------
49 -f::
50         If an existing replace ref for the same object exists, it will
51         be overwritten (instead of failing).
52
53 -d::
54         Delete existing replace refs for the given objects.
55
56 -l <pattern>::
57         List replace refs for objects that match the given pattern (or
58         all if no pattern is given).
59         Typing "git replace" without arguments, also lists all replace
60         refs.
61
62 BUGS
63 ----
64 Comparing blobs or trees that have been replaced with those that
65 replace them will not work properly. And using 'git reset --hard' to
66 go back to a replaced commit will move the branch to the replacement
67 commit instead of the replaced commit.
68
69 There may be other problems when using 'git rev-list' related to
70 pending objects. And of course things may break if an object of one
71 type is replaced by an object of another type (for example a blob
72 replaced by a commit).
73
74 SEE ALSO
75 --------
76 linkgit:git-tag[1]
77 linkgit:git-branch[1]
78 linkgit:git[1]
79
80 Author
81 ------
82 Written by Christian Couder <chriscool@tuxfamily.org> and Junio C
83 Hamano <gitster@pobox.com>, based on 'git tag' by Kristian Hogsberg
84 <krh@redhat.com> and Carlos Rica <jasampler@gmail.com>.
85
86 Documentation
87 --------------
88 Documentation by Christian Couder <chriscool@tuxfamily.org> and the
89 git-list <git@vger.kernel.org>, based on 'git tag' documentation.
90
91 GIT
92 ---
93 Part of the linkgit:git[1] suite