git is a fast version control system that lets you collaborate on a project. For details on how to use git, go and read the git tutorial. For details on the public git repository, please check it here.
The homepage of the Worg project is here: https://orgmode.org/worg/.
To clone a read-only copy of the repo:
~$ git clone https://code.orgmode.org/bzg/worg.git
If you intend to push changes, see below to ask for an account; and, then clone like this:
~$ git clone git@code.orgmode.org:bzg/worg.git
Since Worg is constantly updated you may want to update your copy of
Worg before reading sometimes later. To do so cd
into the Worg
directory and upgrade your copy of Worg with the command:
~$ git pull
If you want to contribute to Worg, keep reading.
:PROPERTIES: :CUSTOM_ID: contribute-to-worg :END:
git
on your system. Tell git
to use your private key withHost code.orgmode.org HostName code.orgmode.org IdentityFile ~/.ssh/your-private-ssh-key-file-name
~$ git clone git@code.orgmode.org:bzg/worg.git
worg/
directory and edit some files.~$ git add *.org
~$ git commit -a -m "summary comment about all changes"
bzg AT gnu.org
to be added as a collaborator on the Worg repo.~$ git push
The system is designed for immediate updates -- if not, it means something is wrong. You should be able to read the error message and see what is wrong, then help with fixing issues. In general the issues are trivial to fix.
worg/
directory.~$ git pull --rebase
~$ git commit -a -m "summary comment about all changes"~$ git push
- Push your change on the remote repository
The Worg TODO file is worg-todo.org
. If you are a Worg zealot, maybe
you want to add this file to the list of your agenda files. For
example, here is my org-agenda-files
variable:
(setq org-agenda-files '("~/org/bzg.org" "~/git/worg/worg-todo.org")
I have an agenda custom command for checking tasks that are assigned to me:
(org-add-agenda-custom-command '("W" tags "Owner=\"Bastien\""))
The next time someone assigns a task for me, it will appear in my Worg agenda view.
Information regarding your name can be stored in your global
=~/.gitconfig= file, or in Worg/.git/config
.
Edit it like this:
[user] name = FirstName LastName email = you@yourdomain.example.com
Now your changes will be filed under your name.
It's good practice to pull the current version of the repository
before making your own additions. But even if you do, someone might
make a change while you are working. So it will often be necessary to
pull immediately before pushing your new commit. In this situation, if
you use git pull
directly, then a 'merge commit' will be generated,
looking like this:
commit aaaabbbbbbbbbaaaaaaaaabbbbbbbb Merge: bababa efefefef Author: Some one Date: Wed Nov 24 00:00:01 2010 -0700
Merge branch 'master' of git+ssh://repo.or.cz/srv/git/Worg
That's not a major problem, but it's nice to keep the commit logs free of this stuff. To avoid generating the merge commit, use the =--rebase= option when pulling:
~$ git pull --rebase
Basically this means that your commit will be put to the top of the
stack, as if no one had made any additions while you were
working. More advanced git users might make their changes in a
personal branch, and then rebase that branch against a freshly pulled
master branch before merging it in to master. The end result would be
the same as pulling with --rebase
.
Unix, Windows and Mac all have different conventions for marking the end of a line. This might lead to problems when editing the same file across platforms. Github advises Linux users to automatically convert all external files to LF on committing (see http://help.github.com/dealing-with-lineendings) by setting:
~$ git config --global core.autocrlf input
For Worg, this is the wrong solution, since there are already files with both end of line conventions in the repository. Instead tell git locally not to convert files by setting:
~$ git config core.autocrlf false
Of course you have to be careful not to save Windows files as Unix files or vice versa, since this would lead to large and confusing diffs. This should not be a problem with Worg as
See .
Emacs's VC supports many common git operations, but others, like
repository syncing must be done from the command line. For example
the Command C-x v v
does check in changes in the local and not
in the remote repository in contrast to other back ends like svn.
It is necessary to do additionally
~$ git push
to sync the change on the remote server.