diff options
| author | David Engster | 2014-11-27 23:17:40 +0100 |
|---|---|---|
| committer | David Engster | 2014-11-27 23:23:48 +0100 |
| commit | 692322388c9f5bdebf2e8c4f7434c1d4769a04cc (patch) | |
| tree | 88c162f390829266271e79d9b3f54e94856e50f9 /admin/notes/git-workflow | |
| parent | d931478266f7ec1216c927caf926f8be8cec4094 (diff) | |
| download | emacs-692322388c9f5bdebf2e8c4f7434c1d4769a04cc.tar.gz emacs-692322388c9f5bdebf2e8c4f7434c1d4769a04cc.zip | |
admin: Add documentation for gitmerge.el
* gitmerge.el: New file.
* notes/git-workflow: Add documentation for using it.
Diffstat (limited to 'admin/notes/git-workflow')
| -rw-r--r-- | admin/notes/git-workflow | 56 |
1 files changed, 51 insertions, 5 deletions
diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 71ebd2abc96..d1d105a8a7a 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow | |||
| @@ -68,11 +68,57 @@ and add "Backport:" to the commit string. Then | |||
| 68 | git push | 68 | git push |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | Merging emacs-24 to trunk | 71 | Merging emacs-24 to trunk/master |
| 72 | ========================= | 72 | ================================ |
| 73 | 73 | ||
| 74 | This has yet to be written. | 74 | It is recommended to use the file gitmerge.el in the admin directory |
| 75 | 75 | for merging 'emacs-24' into 'master'. It will take care of many | |
| 76 | things which would otherwise have to be done manually, like ignoring | ||
| 77 | commits that should not land in master, fixing up ChangeLogs and | ||
| 78 | automatically dealing with certain types of conflicts. If you really | ||
| 79 | want to, you can do the merge manually, but then you're on your own. | ||
| 80 | If you still choose to do that, make absolutely sure that you *always* | ||
| 81 | use the 'merge' command to transport commits from 'emacs-24' to | ||
| 82 | 'master'. *Never* use 'cherry-pick'! If you don't know why, then you | ||
| 83 | shouldn't manually do the merge in the first place; just use | ||
| 84 | gitmerge.el instead. | ||
| 85 | |||
| 86 | How to use gitmerge.el: | ||
| 87 | |||
| 88 | Enter the Emacs repository, checkout 'master' and make sure it's | ||
| 89 | up-to-date by doing a pull. Then start Emacs with | ||
| 90 | |||
| 91 | emacs -l admin/gitmerge.el -f gitmerge | ||
| 92 | |||
| 93 | You'll be asked for the branch to merge, which will default to | ||
| 94 | 'origin/emacs-24', which you should accept. Merging a local tracking | ||
| 95 | branch is discouraged, since it might not be up-to-date, or worse, | ||
| 96 | contain commits from you which are not yet pushed upstream. | ||
| 97 | |||
| 98 | You will now see the list of commits from 'emacs-24' which are not yet | ||
| 99 | merged to 'master'. You might also see commits that are already | ||
| 100 | marked for "skipping", which means that they will be merged with a | ||
| 101 | different merge strategy ('ours'), which will effectively ignore the | ||
| 102 | commit's diff while still being seen as merged, so it won't turn up | ||
| 103 | again in future merges. Recognizing these kinds of commits is done | ||
| 104 | with a simple regexp searching the log for strings like 'backport' or | ||
| 105 | 'merge', so you'll probably see false positives as well as false | ||
| 106 | negatives. Carefully go through the commits, investigate them by | ||
| 107 | hitting 'l', 'd' and 'f', and mark or unmark them for skipping with | ||
| 108 | 's'. When you're done, hit 'm' to start the merge. | ||
| 109 | |||
| 110 | You'll likely get conflicts during the process which cannot be dealt | ||
| 111 | with automatically. In that case, the merge will stop and show you | ||
| 112 | the list of conflicted files. Resolve those conflicts as usual using | ||
| 113 | smerge and restart gitmerge (remember to enter the repository when | ||
| 114 | doing that). You don't have to 'add' the resolved files and 'commit' | ||
| 115 | the resulting merge, but if you really want to, feel free to do that. | ||
| 116 | Note you can also resume gitmerge in a new Emacs session, since the | ||
| 117 | current state will be saved to disk. | ||
| 118 | |||
| 119 | When everything's done, look hard at the resulting merge. Skipping | ||
| 120 | commits requires separate merges, so don't be surprised to see more | ||
| 121 | than one merge commit. If you're happy, push. | ||
| 76 | 122 | ||
| 77 | Warnings about X11 forwarding | 123 | Warnings about X11 forwarding |
| 78 | ============================= | 124 | ============================= |