Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/Documentation/git-merge-file.adoc # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / Documentation / git-merge-file.adoc` 125 lines ยท 4213 bytes Raw Blame History 1 git-merge-file(1) 2 ================= 3 4 NAME 5 ---- 6 git-merge-file - Run a three-way file merge 7 8 9 SYNOPSIS 10 -------- 11 [verse] 12 'git merge-file' [-L [-L [-L ]]] 13 [--ours|--theirs|--union] [-p|--stdout] [-q|--quiet] [--marker-size=] 14 [--[no-]diff3] [--object-id] 15 16 17 DESCRIPTION 18 ----------- 19 Given three files ``, `` and ``, 20 'git merge-file' incorporates all changes that lead from `` 21 to `` into ``. The result ordinarily goes into 22 ``. 'git merge-file' is useful for combining separate changes 23 to an original. Suppose `` is the original, and both 24 `` and `` are modifications of ``, 25 then 'git merge-file' combines both changes. 26 27 A conflict occurs if both `` and `` have changes 28 in a common segment of lines. If a conflict is found, 'git merge-file' 29 normally outputs a warning and brackets the conflict with lines containing 30 <<<<<<< and >>>>>>> markers. A typical conflict will look like this: 31 32 <<<<<<< A 33 lines in file A 34 ======= 35 lines in file B 36 >>>>>>> B 37 38 If there are conflicts, the user should edit the result and delete one of 39 the alternatives. When `--ours`, `--theirs`, or `--union` option is in effect, 40 however, these conflicts are resolved favouring lines from ``, 41 lines from ``, or lines from both respectively. The length of the 42 conflict markers can be given with the `--marker-size` option. 43 44 If `--object-id` is specified, exactly the same behavior occurs, except that 45 instead of specifying what to merge as files, it is specified as a list of 46 object IDs referring to blobs. 47 48 The exit value of this program is negative on error, and the number of 49 conflicts otherwise (truncated to 127 if there are more than that many 50 conflicts). If the merge was clean, the exit value is 0. 51 52 'git merge-file' is designed to be a minimal clone of RCS 'merge'; that is, it 53 implements all of RCS 'merge''s functionality which is needed by 54 linkgit:git[1]. 55 56 57 OPTIONS 58 ------- 59 60 --object-id:: 61 Specify the contents to merge as blobs in the current repository instead of 62 files. In this case, the operation must take place within a valid repository. 63 + 64 If the `-p` option is specified, the merged file (including conflicts, if any) 65 goes to standard output as normal; otherwise, the merged file is written to the 66 object store and the object ID of its blob is written to standard output. 67 68 -L