|
| 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 | +OPTIONS |
| 27 | +------- |
| 28 | +-f:: |
| 29 | + If an existing replace ref for the same object exists, it will |
| 30 | + be overwritten (instead of failing). |
| 31 | + |
| 32 | +-d:: |
| 33 | + Delete existing replace refs for the given objects. |
| 34 | + |
| 35 | +-l <pattern>:: |
| 36 | + List replace refs for objects that match the given pattern (or |
| 37 | + all if no pattern is given). |
| 38 | + Typing "git replace" without arguments, also lists all replace |
| 39 | + refs. |
| 40 | + |
| 41 | +BUGS |
| 42 | +---- |
| 43 | +Comparing blobs or trees that have been replaced with those that |
| 44 | +replace them will not work properly. And using 'git reset --hard' to |
| 45 | +go back to a replaced commit will move the branch to the replacement |
| 46 | +commit instead of the replaced commit. |
| 47 | + |
| 48 | +There may be other problems when using 'git rev-list' related to |
| 49 | +pending objects. And of course things may break if an object of one |
| 50 | +type is replaced by an object of another type (for example a blob |
| 51 | +replaced by a commit). |
| 52 | + |
| 53 | +SEE ALSO |
| 54 | +-------- |
| 55 | +linkgit:git-tag[1] |
| 56 | +linkgit:git-branch[1] |
| 57 | + |
| 58 | +Author |
| 59 | +------ |
| 60 | +Written by Christian Couder < [email protected]> and Junio C |
| 61 | +Hamano < [email protected]>, based on 'git tag' by Kristian Hogsberg |
| 62 | + |
| 63 | + |
| 64 | +Documentation |
| 65 | +-------------- |
| 66 | +Documentation by Christian Couder < [email protected]> and the |
| 67 | +git-list < [email protected]>, based on 'git tag' documentation. |
| 68 | + |
| 69 | +GIT |
| 70 | +--- |
| 71 | +Part of the linkgit:git[1] suite |
0 commit comments