diff options
| author | Glenn Morris | 2020-05-03 10:18:04 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-05-03 10:18:04 -0700 |
| commit | 97146efdc62914a99cce5a9bf4db4770c4aaa3ca (patch) | |
| tree | 7ceba21c9b8fa2ce27bc7c9fdf79c048d6185fdb /admin | |
| parent | 20c1e7f8af08dadba1d69ff93ca9671cb26cd246 (diff) | |
| download | emacs-97146efdc62914a99cce5a9bf4db4770c4aaa3ca.tar.gz emacs-97146efdc62914a99cce5a9bf4db4770c4aaa3ca.zip | |
; admin/notes/git-workflow
Prefer "release branch" to a specific branch that can only ever get outdated.
Diffstat (limited to 'admin')
| -rw-r--r-- | admin/notes/git-workflow | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 28b6f91a25d..63e96d0397c 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow | |||
| @@ -15,14 +15,15 @@ Initial setup | |||
| 15 | ============= | 15 | ============= |
| 16 | 16 | ||
| 17 | Then we want to clone the repository. We normally want to have both | 17 | Then we want to clone the repository. We normally want to have both |
| 18 | the current master and the emacs-26 branch. | 18 | the current master and (if there is one) the active release branch |
| 19 | (eg emacs-27). | ||
| 19 | 20 | ||
| 20 | mkdir ~/emacs | 21 | mkdir ~/emacs |
| 21 | cd ~/emacs | 22 | cd ~/emacs |
| 22 | git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master | 23 | git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master |
| 23 | cd master | 24 | cd master |
| 24 | git config push.default current | 25 | git config push.default current |
| 25 | git worktree add ../emacs-26 emacs-26 | 26 | git worktree add ../emacs-27 emacs-27 |
| 26 | 27 | ||
| 27 | You now have both branches conveniently accessible, and you can do | 28 | You now have both branches conveniently accessible, and you can do |
| 28 | "git pull" in them once in a while to keep updated. | 29 | "git pull" in them once in a while to keep updated. |
| @@ -52,11 +53,11 @@ you commit your change locally and then send a patch file as a bug report | |||
| 52 | as described in ../../CONTRIBUTE. | 53 | as described in ../../CONTRIBUTE. |
| 53 | 54 | ||
| 54 | 55 | ||
| 55 | Backporting to emacs-26 | 56 | Backporting to release branch |
| 56 | ======================= | 57 | ============================= |
| 57 | 58 | ||
| 58 | If you have applied a fix to the master, but then decide that it should | 59 | If you have applied a fix to the master, but then decide that it should |
| 59 | be applied to the emacs-26 branch, too, then | 60 | be applied to the release branch, too, then |
| 60 | 61 | ||
| 61 | cd ~/emacs/master | 62 | cd ~/emacs/master |
| 62 | git log | 63 | git log |
| @@ -66,7 +67,7 @@ which will look like | |||
| 66 | 67 | ||
| 67 | commit 958b768a6534ae6e77a8547a56fc31b46b63710b | 68 | commit 958b768a6534ae6e77a8547a56fc31b46b63710b |
| 68 | 69 | ||
| 69 | cd ~/emacs/emacs-26 | 70 | cd ~/emacs/emacs-27 |
| 70 | git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b | 71 | git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b |
| 71 | 72 | ||
| 72 | and add "Backport:" to the commit string. Then | 73 | and add "Backport:" to the commit string. Then |
| @@ -74,17 +75,17 @@ and add "Backport:" to the commit string. Then | |||
| 74 | git push | 75 | git push |
| 75 | 76 | ||
| 76 | 77 | ||
| 77 | Merging emacs-26 to the master | 78 | Merging release branch to the master |
| 78 | ============================== | 79 | ==================================== |
| 79 | 80 | ||
| 80 | It is recommended to use the file gitmerge.el in the admin directory | 81 | It is recommended to use the file gitmerge.el in the admin directory |
| 81 | for merging 'emacs-26' into 'master'. It will take care of many | 82 | for merging the release branch into 'master'. It will take care of many |
| 82 | things which would otherwise have to be done manually, like ignoring | 83 | things which would otherwise have to be done manually, like ignoring |
| 83 | commits that should not land in master, fixing up ChangeLogs and | 84 | commits that should not land in master, fixing up ChangeLogs and |
| 84 | automatically dealing with certain types of conflicts. If you really | 85 | automatically dealing with certain types of conflicts. If you really |
| 85 | want to, you can do the merge manually, but then you're on your own. | 86 | want to, you can do the merge manually, but then you're on your own. |
| 86 | If you still choose to do that, make absolutely sure that you *always* | 87 | If you still choose to do that, make absolutely sure that you *always* |
| 87 | use the 'merge' command to transport commits from 'emacs-26' to | 88 | use the 'merge' command to transport commits from the release branch to |
| 88 | 'master'. *Never* use 'cherry-pick'! If you don't know why, then you | 89 | 'master'. *Never* use 'cherry-pick'! If you don't know why, then you |
| 89 | shouldn't manually do the merge in the first place; just use | 90 | shouldn't manually do the merge in the first place; just use |
| 90 | gitmerge.el instead. | 91 | gitmerge.el instead. |
| @@ -97,11 +98,11 @@ up-to-date by doing a pull. Then start Emacs with | |||
| 97 | emacs -l admin/gitmerge.el -f gitmerge | 98 | emacs -l admin/gitmerge.el -f gitmerge |
| 98 | 99 | ||
| 99 | You'll be asked for the branch to merge, which will default to | 100 | You'll be asked for the branch to merge, which will default to |
| 100 | 'origin/emacs-26', which you should accept. Merging a local tracking | 101 | (eg) 'origin/emacs-27', which you should accept. Merging a local tracking |
| 101 | branch is discouraged, since it might not be up-to-date, or worse, | 102 | branch is discouraged, since it might not be up-to-date, or worse, |
| 102 | contain commits from you which are not yet pushed upstream. | 103 | contain commits from you which are not yet pushed upstream. |
| 103 | 104 | ||
| 104 | You will now see the list of commits from 'emacs-26' which are not yet | 105 | You will now see the list of commits from the release branch that are not yet |
| 105 | merged to 'master'. You might also see commits that are already | 106 | merged to 'master'. You might also see commits that are already |
| 106 | marked for "skipping", which means that they will be merged with a | 107 | marked for "skipping", which means that they will be merged with a |
| 107 | different merge strategy ('ours'), which will effectively ignore the | 108 | different merge strategy ('ours'), which will effectively ignore the |