Fix for links in lists.
[Worg.git] / worg-git.org
blob23456174fde9a2671d0abdbc54e03ad40bf2ab5a
1 #+STARTUP:    align fold nodlcheck hidestars oddeven lognotestate
2 #+SEQ_TODO:   TODO(t) INPROGRESS(i) WAITING(w@) | DONE(d) CANCELED(c@)
3 #+TITLE:      How to use git to edit Worg files?
4 #+AUTHOR:     Worg people
5 #+TAGS:       Write(w) Update(u) Fix(f) Check(c)
6 #+EMAIL:      bzg AT altern DOT org
7 #+LANGUAGE:   en
8 #+PRIORITIES: A C B
9 #+CATEGORY:   worg
10 #+OPTIONS:    H:3 num:nil toc:t \n:nil @:t ::t |:t ^:t -:t f:t *:t TeX:t LaTeX:t skip:nil d:(HIDE) tags:not-in-toc
12 [[file:index.org][{Back to Worg's index}]]
14 * What is git?
16 [[http://git.or.cz][git]] is a fast version control system that lets you collaborate on a project.
17 For details on how to use git, go and read the [[http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html][git tutorial]].  For details on
18 the public git repository, go and read the [[http://repo.or.cz/about.html][about page]] of
19 http://repo.or.cz/.
21 The homepage of the Worg project is here: http://repo.or.cz/w/Worg.git
23 * The first time you contribute to Worg
25 1. If you don't have a SSH-key, [[file:worg-git-ssh-key.org][create one]].
27 2. Register a [[http://repo.or.cz/m/reguser.cgi][new account]] on the git public repository.
29 3. Drop an email to [[mailto:bzg%20AT%20altern%20DOT%20org][Bastien]] mentioning your username on repo.or.cz
31 4. Install git on your system.
33 5. Clone the project somewhere in a working directory:
35    :~$ git clone git+ssh://repo.or.cz/srv/git/Worg.git
37 6. Go to the newly created =Worg/= directory and edit some files.
39 7. If you created files, add them to the git index:
41    :~$ git add *.org
43 8. Commit changes with the appropriate ChangeLog:
45   :~$ git commit -a -m "My changelog"
47 9. Push your change to Worg:
49   :~$ git push
51   This stage didn't work for me, instead I had to add a remote like
52   so:
54   :~$ git remote add public git+ssh://<UserName>@repo.or.cz/srv/git/Worg.git
56   Where <UserName> is the username you supplied repo.or.cz.  Then do
57   a:
59   :~$ git push public
61 * How Worg publishes itself as HTML?
63   The server behind http://orgmode.org website takes care of publishing
64   Worg into =HTML=.  This is done in two steps: the first step is to
65   pull the Worg directly on the server, the second one is to publish the
66   last version of Worg on the website.  Both steps are cron'ed every
67   hour, the first one at 1:00, 2:00, etc. and the second one at 1:30,
68   2:30.
70   So for example, if you push a change in Worg at 0:58am, this will be
71   pulled on the server at 1am and will appear on the website at 1:30am.
73 * The second time you contribute to Worg
75 1. Go to your =Worg/= directory.
77 2. Be sure to "pull" the last version of the repository.
79 3. Make some changes.
81 4. Commit your changes on your local repository: 
82    
83    :~$ git commit -a -m "My ChangeLog"
85 5. Push your change on the remote repository
87    :~$ git push
89 * Getting organized
91 The Worg TODO file is =worg-todo.org=.  If you are a Worg zealot, maybe you
92 want to add this file to the list of your agenda files.  For example, here
93 is my =org-agenda-files= variable:
95   :(setq org-agenda-files '("~/org/bzg.org" "~/git/Worg/worg-todo.org")
97 I have an agenda custom command for checking tasks that are assigned to me:
99   :(org-add-agenda-custom-command '("W" tags "Owner=\"Bastien\""))
101 The next time someone assigns a task for me, it will appear in my Worg
102 agenda view.  
104 * Register your changes under your name
106 Information regarding your name can be stored in your ~/.gitconfig file.
108 Edit it like this:
110 : [user]
111 :        name = Your Name Goes Here
112 :        email = you@yourdomain.example.com
114 Now your changes will be filed under your name.
116 # I'm not sure this is useful at all:
117 * COMMENT Anonymous editing through the "mob" user/branch
119 If you don't want to register a new account on =repo.or.gz= but still
120 want to suggest modifications on Worg, you can do this by editing the
121 "mob" branch of Worg.  For details about the =mob= user, check [[http://repo.or.cz/mob.html][this
122 webpage]] on repo.or.cz
124 This branch is usually empty, since interesting changes are quickly
125 merged into the master branch.  But it is important to make sure that
126 you pull all changes in any existing =mob= branch before trying to push
127 yours.
129 1. Clone the Worg project as the =mob= user:
131    :~$ git clone git+ssh://mob@repo.or.cz/srv/git/Worg.git
133 2. Check out the "mob" branch to avoid conflicts between the =mob=
134    branch that you will soon create and any existing =mob= branch:
136    :~$ git checkout origin/mob
138    You should get this warning:
140    : Note: moving to "origin/mob" which isn't a local branch
141    : If you want to create a new branch from this checkout, you may do so
142    : now or later) by using -b with the checkout command again. Example:
143    : git checkout -b <new_branch_name>
145    Don't worry.
147 3. Create a new branch named =mob= from this checkout:
149    :~$ git checkout -b mob
151 4. Edit the files, add new files (=git-add=) and commit (=git-commit=)
152    them as usual.
154 5. Push the =mob= branch into the Worg remote directory:
156    :~$ git push origin mob
158 You're done!
173 # FIXME:
174 # What if two people edit Worg at the same time?
175 # Can I have private sections in Worg?