1 #+TITLE: Advanced usage of git for Worg
2 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
3 #+SEQ_TODO: TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
5 #+TAGS: Write(w) Update(u) Fix(f) Check(c)
6 #+EMAIL: mdl AT imapmail DOT org
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 page answer various questions on how to use git for editing Worg.
16 If you're looking for a quick introduction on how to use git to
17 contribute to Worg, please read [[file:worg-git.org][this page]] instead.
19 * Shall I create a branch?
23 : ~$ git checkout -b t/my-topic-branch
24 : ~$ git commit -a -m "A line describing my change"
26 From here, either you are a registered Worg contributor and want to
27 merge the branch before pushing to Worg's repo, either you just want to
30 If you want to merge the branch and push to Worg:
32 : ~$ git checkout master
33 : ~$ git merge t/my-topic-branch
36 If you just want to send patches, see below.
38 When you're done with a branch, you can delete it with:
40 : ~$ git branch -D t/my-topic-branch
42 * I just want to send patches!
46 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
47 directly with [[http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html][git send-email]].
49 ** Use git format-patch
51 We suppose you are in a branch called =t/my-topic-branch= and that you
52 committed your changes.
54 : ~$ git format-patch origin
56 will create a separate mbox file for each commit, ready to be sent.
58 : ~$ git format-patch -3
60 will create three separate files for the last three commits you did in
63 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
68 If your Worg repo is in =~/git/Worg= and if your emails are sent through
69 the =sendmail= command, please add this to =~/git/Worg/.git/config=:
72 : to = bzg AT gnu DOT org
74 (Replace =AT= and =DOT= by the =@= and =.=)
76 Then the =git send-email= command will send the patches directly to
79 Use =git send-email= like this:
81 : ~$ git send-email --annotate -3
83 to review and annotate the last three commits in the current branch