aboutsummaryrefslogtreecommitdiffstats
path: root/admin/notes/git-workflow
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2014-11-15 17:06:34 +0100
committerLars Magne Ingebrigtsen2014-11-15 17:06:34 +0100
commit788bc73c80bcd1e748a389692963c1464ba963df (patch)
tree7debb5bf55a3536ccf05ac51059b7e21f405ed27 /admin/notes/git-workflow
parent658b768a6534ae6e77a8547a56fc31b46b63710b (diff)
downloademacs-788bc73c80bcd1e748a389692963c1464ba963df.tar.gz
emacs-788bc73c80bcd1e748a389692963c1464ba963df.zip
Add a draft of a very simple git workflow
Diffstat (limited to 'admin/notes/git-workflow')
-rw-r--r--admin/notes/git-workflow73
1 files changed, 73 insertions, 0 deletions
diff --git a/admin/notes/git-workflow b/admin/notes/git-workflow
new file mode 100644
index 00000000000..4bda3f5c909
--- /dev/null
+++ b/admin/notes/git-workflow
@@ -0,0 +1,73 @@
1(This is a draft. The method here won't actually work yet, because
2neither git-new-workdir nor merge-changelog are in the Emacs
3distribution yet.)
4
5Setting up and using git for normal, simple bugfixing
6=====================================================
7
8If you haven't configured git before you should first do:
9
10git config --global user.name "Frank Chu"
11git config --global user.email "fchu@example.com"
12
13Initial setup
14=============
15
16Then we want to clone the repository. We normally want to have both
17the current trunk and the emacs-24 branch.
18
19mkdir ~/emacs
20cd ~/emacs
21git clone <membername>@git.sv.gnu.org:/srv/git/emacs.git
22mv emacs trunk
23./trunk/admin/git-new-workdir trunk emacs-24
24cd emacs-24
25git checkout emacs-24
26
27You now have both branches conveniently accessible, and you can do
28"git pull" in them once in a while to keep updated.
29
30
31Fixing bugs
32===========
33
34You edit the files in either branch, `M-x vc-dir', and check in your
35changes. Then you need to push the data to the main repository. This
36will usually fail, since somebody else has pushed other changes in the
37meantime. To fix this, say
38
39git pull --rebase
40
41which will update your repository, and then re-apply your changes on
42top of that. Then say
43
44git push
45
46
47Backporting to emacs-24
48=======================
49
50If you have applied a fix to the trunk, but then decide that it should
51be applied to the emacs-24 branch, too, then
52
53cd ~/emacs/trunk
54git log
55
56and find the commit you're looking for. Then find the commit ID,
57which will look like
58
59commit 958b768a6534ae6e77a8547a56fc31b46b63710b
60
61cd ~/emacs/emacs-24
62git cherry-pick 958b768a6534ae6e77a8547a56fc31b46b63710b
63git commit --amend
64
65and add "Backport:" to the commit string. Then
66
67git push
68
69
70Merging emacs-24 to trunk
71=========================
72
73This has yet to be written.