1 #+TITLE: Advanced usage of git for Worg
3 #+EMAIL: mdl AT imapmail DOT org
4 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
5 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
6 #+TAGS: Write(w) Update(u) Fix(f) Check(c)
10 #+OPTIONS: H:3 num:nil toc:t \n:nil ::t |:t ^:t -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc
11 #+HTML_LINK_UP: index.html
12 #+HTML_LINK_HOME: https://orgmode.org/worg/
14 # This file is released by its authors and contributors under the GNU
15 # Free Documentation license v1.3 or later, code examples are released
16 # under the GNU General Public License v3 or later.
18 This page answer various questions on how to use git for editing Worg.
20 If you're looking for a quick introduction on how to use git to
21 contribute to Worg, please read [[file:worg-git.org][this page]] instead.
23 * Shall I create a branch?
27 : ~$ git checkout -b t/my-topic-branch
28 : ~$ git commit -a -m "A line describing my change"
30 From here, either you are a registered Worg contributor and want to
31 merge the branch before pushing to Worg's repo, either you just want to
34 If you want to merge the branch and push to Worg:
36 : ~$ git checkout master
37 : ~$ git merge t/my-topic-branch
40 If you just want to send patches, see below.
42 When you're done with a branch, you can delete it with:
44 : ~$ git branch -D t/my-topic-branch
46 * I just want to send patches!
50 You can either either prepare patches with [[http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html][git format-patch]] or send them
51 directly with [[http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html][git send-email]].
53 ** Use git format-patch
55 We suppose you are in a branch called =t/my-topic-branch= and that you
56 committed your changes.
58 : ~$ git format-patch origin
60 will create a separate mbox file for each commit, ready to be sent.
62 : ~$ git format-patch -3
64 will create three separate files for the last three commits you did in
67 See the documentation of [[http://www.kernel.org/pub/software/scm/git/docs/git-format-patch.html][git format-patch]] to set the value of the
72 If your Worg repo is in =~/git/Worg= and if your emails are sent through
73 the =sendmail= command, please add this to =~/git/Worg/.git/config=:
76 : to = bzg AT gnu DOT org
78 (Replace =AT= and =DOT= by the =@= and =.=)
80 Then the =git send-email= command will send the patches directly to
83 Use =git send-email= like this:
85 : ~$ git send-email --annotate -3
87 to review and annotate the last three commits in the current branch