aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorGlenn Morris2020-05-03 10:18:04 -0700
committerGlenn Morris2020-05-03 10:18:04 -0700
commit97146efdc62914a99cce5a9bf4db4770c4aaa3ca (patch)
tree7ceba21c9b8fa2ce27bc7c9fdf79c048d6185fdb /admin
parent20c1e7f8af08dadba1d69ff93ca9671cb26cd246 (diff)
downloademacs-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-workflow25
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
17Then we want to clone the repository. We normally want to have both 17Then we want to clone the repository. We normally want to have both
18the current master and the emacs-26 branch. 18the current master and (if there is one) the active release branch
19(eg emacs-27).
19 20
20mkdir ~/emacs 21mkdir ~/emacs
21cd ~/emacs 22cd ~/emacs
22git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master 23git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git master
23cd master 24cd master
24git config push.default current 25git config push.default current
25git worktree add ../emacs-26 emacs-26 26git worktree add ../emacs-27 emacs-27
26 27
27You now have both branches conveniently accessible, and you can do 28You 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
52as described in ../../CONTRIBUTE. 53as described in ../../CONTRIBUTE.
53 54
54 55
55Backporting to emacs-26 56Backporting to release branch
56======================= 57=============================
57 58
58If you have applied a fix to the master, but then decide that it should 59If you have applied a fix to the master, but then decide that it should
59be applied to the emacs-26 branch, too, then 60be applied to the release branch, too, then
60 61
61cd ~/emacs/master 62cd ~/emacs/master
62git log 63git log
@@ -66,7 +67,7 @@ which will look like
66 67
67commit 958b768a6534ae6e77a8547a56fc31b46b63710b 68commit 958b768a6534ae6e77a8547a56fc31b46b63710b
68 69
69cd ~/emacs/emacs-26 70cd ~/emacs/emacs-27
70git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b 71git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b
71 72
72and add "Backport:" to the commit string. Then 73and add "Backport:" to the commit string. Then
@@ -74,17 +75,17 @@ and add "Backport:" to the commit string. Then
74git push 75git push
75 76
76 77
77Merging emacs-26 to the master 78Merging release branch to the master
78============================== 79====================================
79 80
80It is recommended to use the file gitmerge.el in the admin directory 81It is recommended to use the file gitmerge.el in the admin directory
81for merging 'emacs-26' into 'master'. It will take care of many 82for merging the release branch into 'master'. It will take care of many
82things which would otherwise have to be done manually, like ignoring 83things which would otherwise have to be done manually, like ignoring
83commits that should not land in master, fixing up ChangeLogs and 84commits that should not land in master, fixing up ChangeLogs and
84automatically dealing with certain types of conflicts. If you really 85automatically dealing with certain types of conflicts. If you really
85want to, you can do the merge manually, but then you're on your own. 86want to, you can do the merge manually, but then you're on your own.
86If you still choose to do that, make absolutely sure that you *always* 87If you still choose to do that, make absolutely sure that you *always*
87use the 'merge' command to transport commits from 'emacs-26' to 88use 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
89shouldn't manually do the merge in the first place; just use 90shouldn't manually do the merge in the first place; just use
90gitmerge.el instead. 91gitmerge.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
99You'll be asked for the branch to merge, which will default to 100You'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
101branch is discouraged, since it might not be up-to-date, or worse, 102branch is discouraged, since it might not be up-to-date, or worse,
102contain commits from you which are not yet pushed upstream. 103contain commits from you which are not yet pushed upstream.
103 104
104You will now see the list of commits from 'emacs-26' which are not yet 105You will now see the list of commits from the release branch that are not yet
105merged to 'master'. You might also see commits that are already 106merged to 'master'. You might also see commits that are already
106marked for "skipping", which means that they will be merged with a 107marked for "skipping", which means that they will be merged with a
107different merge strategy ('ours'), which will effectively ignore the 108different merge strategy ('ours'), which will effectively ignore the