~bzg/worg

ref: dea41fec71017fb96e1ba4e408cf900ed0c8bbf4 worg/worg-git-advanced.org -rw-r--r-- 2.7 KiB
dea41fecRussell Adams Updated expectations for non-subscriber posts to be delayed by moderation. 6 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
#+TITLE:      Advanced usage of git for Worg
#+AUTHOR:     Worg people
#+STARTUP:    align fold nodlcheck hidestars oddeven lognotestate
#+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
#+TAGS:       Write(w) Update(u) Fix(f) Check(c)
#+LANGUAGE:   en
#+PRIORITIES: A C B
#+CATEGORY:   worg
#+OPTIONS:    H:3 num:nil toc:t \n:nil ::t |:t ^:t -:t f:t *:t tex:t d:(HIDE) tags:not-in-toc
#+HTML_LINK_UP:    index.html
#+HTML_LINK_HOME:  https://orgmode.org/worg/

# This file is released by its authors and contributors under the GNU
# Free Documentation license v1.3 or later, code examples are released
# under the GNU General Public License v3 or later.

This page answer various questions on how to use git for editing Worg.

If you're looking for a quick introduction on how to use git to
contribute to Worg, please read [[file:worg-about.org::*How to use git for Worg][this section]] instead.

* Shall I create a branch?

Yes, it's cleaner.

: ~$ git checkout -b t/my-topic-branch 
: ~$ git commit -a -m "A line describing my change"

From here, either you are a registered Worg contributor and want to
merge the branch before pushing to Worg's repo, either you just want to
send patches.

If you want to merge the branch and push to Worg:

: ~$ git checkout master
: ~$ git merge t/my-topic-branch
: ~$ git push

If you just want to send patches, see below.

When you're done with a branch, you can delete it with:

: ~$ git branch -D t/my-topic-branch

* I just want to send patches!

It's okay.

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
directly with [[http://www.kernel.org/pub/software/scm/git/docs/git-send-email.html][git send-email]].

** Use git format-patch

We suppose you are in a branch called =t/my-topic-branch= and that you
committed your changes.

: ~$ git format-patch origin

will create a separate mbox file for each commit, ready to be sent.

: ~$ git format-patch -3

will create three separate files for the last three commits you did in
this branch.

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
various headers.

** Use git send-email

If your Worg repo is in =~/git/Worg= and if your emails are sent through
the =sendmail= command, please add this to =~/git/Worg/.git/config=:

: [sendemail]
: 	to = bzg AT gnu DOT org

(Replace =AT= and =DOT= by the =@= and =.=)

Then the =git send-email= command will send the patches directly to
Bastien.

Use =git send-email= like this:

: ~$ git send-email --annotate -3

to review and annotate the last three commits in the current branch
before sending them.