unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* A simple git workflow for the rest of us
@ 2014-11-15 16:09 Lars Magne Ingebrigtsen
  2014-11-15 16:38 ` Eli Zaretskii
                   ` (3 more replies)
  0 siblings, 4 replies; 34+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-11-15 16:09 UTC (permalink / raw)
  To: emacs-devel

I have committed the text below to admin/notes.  I expect all git
experts to be all horrified and stuff, but if you don't care about git
kremlinology, but just want to fix bugs and stuff in Emacs, I don't
think you really need to know.

Feel free to fix the recipes in admin/notes.  But please refrain from
using the words "ref", "staging", "stash" or "local".

--------------

(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
=====================================================

If you haven't configured git before you should first do:

git config --global user.name "Frank Chu"
git config --global user.email "fchu@example.com"

Initial setup
=============

Then we want to clone the repository.  We normally want to have both
the current trunk and the emacs-24 branch.

mkdir ~/emacs
cd ~/emacs
git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git
mv emacs trunk
./trunk/admin/git-new-workdir trunk emacs-24
cd emacs-24
git checkout emacs-24

You now have both branches conveniently accessible, and you can do
"git pull" in them once in a while to keep updated.


Fixing bugs
===========

You edit the files in either branch, `M-x vc-dir', and check in your
changes.  Then you need to push the data to the main repository.  This
will usually fail, since somebody else has pushed other changes in the
meantime.  To fix this, say

git pull --rebase

which will update your repository, and then re-apply your changes on
top of that.  Then say

git push


Backporting to emacs-24
=======================

If you have applied a fix to the trunk, but then decide that it should
be applied to the emacs-24 branch, too, then

cd ~/emacs/trunk
git log

and find the commit you're looking for.  Then find the commit ID,
which will look like

commit 958b768a6534ae6e77a8547a56fc31b46b63710b

cd ~/emacs/emacs-24
git cherry-pick 958b768a6534ae6e77a8547a56fc31b46b63710b
git commit --amend

and add "Backport:" to the commit string.  Then

git push


Merging emacs-24 to trunk
=========================

This has yet to be written.


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2014-11-24 15:25 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-15 16:09 A simple git workflow for the rest of us Lars Magne Ingebrigtsen
2014-11-15 16:38 ` Eli Zaretskii
2014-11-15 17:08   ` Lars Magne Ingebrigtsen
2014-11-16  2:57     ` Ted Zlatanov
2014-11-15 17:43   ` Achim Gratz
2014-11-15 18:04     ` Eli Zaretskii
2014-11-15 17:39 ` Achim Gratz
2014-11-15 17:47   ` Lars Magne Ingebrigtsen
2014-11-15 19:47     ` Karl Fogel
2014-11-16 19:05     ` Bill Wohler
2014-11-22  9:23     ` Steinar Bang
2014-11-22 13:35       ` Lars Magne Ingebrigtsen
2014-11-22 15:00         ` Steinar Bang
2014-11-22 15:26           ` Lars Magne Ingebrigtsen
2014-11-15 18:17   ` Andreas Schwab
2014-11-15 20:20   ` Kelvin White
2014-11-15 20:54     ` Kelvin White
2014-11-16 19:33   ` Bill Wohler
2014-11-16 19:43     ` Lars Magne Ingebrigtsen
2014-11-16 20:12       ` Ted Zlatanov
2014-11-16 20:19     ` Eli Zaretskii
2014-11-22  9:29     ` Steinar Bang
2014-11-23 18:28       ` Bill Wohler
2014-11-24 15:25         ` Sergey Organov
2014-11-15 19:08 ` Lars Magne Ingebrigtsen
2014-11-15 19:46   ` Andreas Schwab
2014-11-16 14:13     ` Lars Magne Ingebrigtsen
2014-11-16 14:34       ` David Engster
2014-11-16 14:42         ` Lars Magne Ingebrigtsen
2014-11-16 14:50           ` David Engster
2014-11-16 14:54             ` Lars Magne Ingebrigtsen
2014-11-16 15:19             ` David Kastrup
2014-11-16 14:36       ` Achim Gratz
2014-11-16  2:15 ` Glenn Morris

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).