]>
Commit | Line | Data |
---|---|---|
42e2cba2 | 1 | git-am(1) |
05625af3 | 2 | ========= |
42e2cba2 PB |
3 | |
4 | NAME | |
5 | ---- | |
6 | git-am - Apply a series of patches in a mailbox | |
7 | ||
8 | ||
9 | SYNOPSIS | |
10 | -------- | |
baa720f5 | 11 | 'git-am' [--signoff] [--dotest=<dir>] [--utf8] [--3way] <mbox>... |
42e2cba2 PB |
12 | 'git-am' [--skip] |
13 | ||
14 | DESCRIPTION | |
15 | ----------- | |
16 | Splits mail messages in a mailbox into commit log message, | |
17 | authorship information and patches, and applies them to the | |
18 | current branch. | |
19 | ||
baa720f5 JH |
20 | OPTIONS |
21 | ------- | |
22 | --signoff:: | |
23 | Add `Signed-off-by:` line to the commit message, using | |
24 | the committer identity of yourself. | |
42e2cba2 | 25 | |
baa720f5 JH |
26 | --dotest=<dir>:: |
27 | Instead of `.dotest` directory, use <dir> as a working | |
28 | area to store extracted patches. | |
42e2cba2 | 29 | |
baa720f5 JH |
30 | --utf8, --keep:: |
31 | Pass `--utf8` and `--keep` flags to `git-mailinfo` (see | |
32 | gitlink:git-mailinfo[1]). | |
33 | ||
34 | --3way:: | |
35 | When the patch does not apply cleanly, fall back on | |
36 | 3-way merge, if the patch records the identity of blobs | |
37 | it is supposed to apply to, and we have those blobs | |
38 | locally. | |
39 | ||
40 | --skip:: | |
41 | Skip the current patch. This is only meaningful when | |
42 | restarting an aborted patch. | |
43 | ||
44 | --interactive:: | |
45 | Run interactively, just like git-applymbox. | |
46 | ||
47 | ||
48 | DISCUSSION | |
49 | ---------- | |
50 | ||
51 | When initially invoking it, you give it names of the mailboxes | |
52 | to crunch. Upon seeing the first patch that does not apply, it | |
53 | aborts in the middle, just like 'git-applymbox' does. You can | |
54 | recover from this in one of two ways: | |
55 | ||
56 | . skip the current one by re-running the command with '--skip' | |
57 | option. | |
58 | ||
59 | . hand resolve the conflict in the working directory, run 'git | |
60 | diff HEAD' to extract the merge result into a patch form and | |
271440e3 JH |
61 | replacing the patch in .dotest/patch file. After doing this, |
62 | run `git-reset --hard HEAD` to bring the working tree to the | |
63 | state before half-applying the patch, then re-run the command | |
64 | without any options. | |
baa720f5 JH |
65 | |
66 | The command refuses to process new mailboxes while `.dotest` | |
67 | directory exists, so if you decide to start over from scratch, | |
68 | run `rm -f .dotest` before running the command with mailbox | |
69 | names. | |
42e2cba2 PB |
70 | |
71 | ||
72 | SEE ALSO | |
73 | -------- | |
74 | gitlink:git-applymbox[1], gitlink:git-applypatch[1]. | |
75 | ||
76 | ||
77 | Author | |
78 | ------ | |
79 | Written by Junio C Hamano <junkio@cox.net> | |
80 | ||
81 | Documentation | |
82 | -------------- | |
83 | Documentation by Petr Baudis, Junio C Hamano and the git-list <git@vger.kernel.org>. | |
84 | ||
42e2cba2 PB |
85 | GIT |
86 | --- | |
87 | Part of the gitlink:git[7] suite | |
88 |