From a89f0b6f33f9eb8910a1fceda9028d76ef50b05d Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 25 Nov 2017 22:45:41 -0800 Subject: maint: shorten https://lists.gnu.org/archive/html/... links --- admin/notes/git-workflow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'admin/notes/git-workflow') diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 2e4bbac70fe..83e81c68ef0 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -12,7 +12,7 @@ git config --global user.email "fchu@example.com" git config --global transfer.fsckObjects true (See the thread "Recommend these .gitconfig settings for git integrity." -[https://lists.gnu.org/archive/html/emacs-devel/2016-01/threads.html#01802] +[https://lists.gnu.org/r/emacs-devel/2016-01/threads.html#01802] for more details about why that last line is there.) Initial setup -- cgit v1.2.1 From e700fff256fc6c59dc8ab0063b7626486f312e0f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Sun, 28 Jul 2019 17:43:34 +0200 Subject: * admin/notes/git-workflow: Replace git-new-workdir with git worktree and remove draft marker. --- admin/notes/git-workflow | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'admin/notes/git-workflow') diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 54657866ef5..28b6f91a25d 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -1,7 +1,3 @@ -(This is a draft. The method here won't actually work yet, because -neither git-new-workdir nor merge-changelog are in the Emacs -distribution yet.) - Setting up and using git for normal, simple bugfixing ===================================================== @@ -24,10 +20,9 @@ the current master and the emacs-26 branch. mkdir ~/emacs cd ~/emacs git clone @git.sv.gnu.org:/srv/git/emacs.git master -(cd master; git config push.default current) -./master/admin/git-new-workdir master emacs-26 -cd emacs-26 -git checkout emacs-26 +cd master +git config push.default current +git worktree add ../emacs-26 emacs-26 You now have both branches conveniently accessible, and you can do "git pull" in them once in a while to keep updated. -- cgit v1.2.1 From 97146efdc62914a99cce5a9bf4db4770c4aaa3ca Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 3 May 2020 10:18:04 -0700 Subject: ; admin/notes/git-workflow Prefer "release branch" to a specific branch that can only ever get outdated. --- admin/notes/git-workflow | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'admin/notes/git-workflow') 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 ============= Then we want to clone the repository. We normally want to have both -the current master and the emacs-26 branch. +the current master and (if there is one) the active release branch +(eg emacs-27). mkdir ~/emacs cd ~/emacs git clone @git.sv.gnu.org:/srv/git/emacs.git master cd master git config push.default current -git worktree add ../emacs-26 emacs-26 +git worktree add ../emacs-27 emacs-27 You now have both branches conveniently accessible, and you can do "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 as described in ../../CONTRIBUTE. -Backporting to emacs-26 -======================= +Backporting to release branch +============================= If you have applied a fix to the master, but then decide that it should -be applied to the emacs-26 branch, too, then +be applied to the release branch, too, then cd ~/emacs/master git log @@ -66,7 +67,7 @@ which will look like commit 958b768a6534ae6e77a8547a56fc31b46b63710b -cd ~/emacs/emacs-26 +cd ~/emacs/emacs-27 git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b and add "Backport:" to the commit string. Then @@ -74,17 +75,17 @@ and add "Backport:" to the commit string. Then git push -Merging emacs-26 to the master -============================== +Merging release branch to the master +==================================== It is recommended to use the file gitmerge.el in the admin directory -for merging 'emacs-26' into 'master'. It will take care of many +for merging the release branch into 'master'. It will take care of many things which would otherwise have to be done manually, like ignoring commits that should not land in master, fixing up ChangeLogs and automatically dealing with certain types of conflicts. If you really want to, you can do the merge manually, but then you're on your own. If you still choose to do that, make absolutely sure that you *always* -use the 'merge' command to transport commits from 'emacs-26' to +use the 'merge' command to transport commits from the release branch to 'master'. *Never* use 'cherry-pick'! If you don't know why, then you shouldn't manually do the merge in the first place; just use gitmerge.el instead. @@ -97,11 +98,11 @@ up-to-date by doing a pull. Then start Emacs with emacs -l admin/gitmerge.el -f gitmerge You'll be asked for the branch to merge, which will default to -'origin/emacs-26', which you should accept. Merging a local tracking +(eg) 'origin/emacs-27', which you should accept. Merging a local tracking branch is discouraged, since it might not be up-to-date, or worse, contain commits from you which are not yet pushed upstream. -You will now see the list of commits from 'emacs-26' which are not yet +You will now see the list of commits from the release branch that are not yet merged to 'master'. You might also see commits that are already marked for "skipping", which means that they will be merged with a different merge strategy ('ours'), which will effectively ignore the -- cgit v1.2.1 From 82c506192b5ae1a454dccfae2f41fa3ee6d5e990 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Sun, 3 May 2020 10:21:21 -0700 Subject: ; admin/notes/git-workflow Mention reverting on release branch. --- admin/notes/git-workflow | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'admin/notes/git-workflow') diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index 63e96d0397c..d109cdaa354 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -75,6 +75,17 @@ and add "Backport:" to the commit string. Then git push +Reverting on release branch +=========================== + +If a commit is made to the release branch, and then it is later +decided that this change should only be on the master branch, the +simplest way to handle this is to revert the commit on the release +branch, and include in the associated log entry "do not merge to master". +(Otherwise, the reversion may get merged to master, and inadvertently +clobber the change on master if it has been manually made there.) + + Merging release branch to the master ==================================== -- cgit v1.2.1 From 396d2d88afe254715eb3b09226e0353e72c47936 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 13 Oct 2021 11:14:59 -0700 Subject: Change release branch to emacs-28 * admin/notes/git-workflow: * Makefile.in (PREFERRED_BRANCH): emacs-27 → emacs-28 --- admin/notes/git-workflow | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'admin/notes/git-workflow') diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow index d109cdaa354..265a106bad5 100644 --- a/admin/notes/git-workflow +++ b/admin/notes/git-workflow @@ -16,14 +16,14 @@ Initial setup Then we want to clone the repository. We normally want to have both the current master and (if there is one) the active release branch -(eg emacs-27). +(eg emacs-28). mkdir ~/emacs cd ~/emacs git clone @git.sv.gnu.org:/srv/git/emacs.git master cd master git config push.default current -git worktree add ../emacs-27 emacs-27 +git worktree add ../emacs-28 emacs-28 You now have both branches conveniently accessible, and you can do "git pull" in them once in a while to keep updated. @@ -67,7 +67,7 @@ which will look like commit 958b768a6534ae6e77a8547a56fc31b46b63710b -cd ~/emacs/emacs-27 +cd ~/emacs/emacs-28 git cherry-pick -xe 958b768a6534ae6e77a8547a56fc31b46b63710b and add "Backport:" to the commit string. Then @@ -109,7 +109,7 @@ up-to-date by doing a pull. Then start Emacs with emacs -l admin/gitmerge.el -f gitmerge You'll be asked for the branch to merge, which will default to -(eg) 'origin/emacs-27', which you should accept. Merging a local tracking +(eg) 'origin/emacs-28', which you should accept. Merging a local tracking branch is discouraged, since it might not be up-to-date, or worse, contain commits from you which are not yet pushed upstream. -- cgit v1.2.1