[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Store org-files in a git repository?

From: Charles Philip Chan
Subject: Re: [O] Store org-files in a git repository?
Date: Fri, 7 Sep 2012 20:26:45 -0400
User-agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.2.50 (gnu/linux)

Marcelo de Moraes Serpa <address@hidden> writes:

Hello Marcelo and Moritz:

> I have not done yet, but I do use git for my org repo; however, I
> commit every 6 hours via cron (and the commit message is a timestamp).

I have my org repo under git too. However, instead of a cron job, I use
an after-save-hook:

#+BEGIN_SRC emacs-lisp
;;Git integration
(defun git-commit ()
  (when (eq major-mode 'org-mode)
      (shell-command "git commit -a -m 'Auto commit.'")))

      (add-hook 'after-save-hook 'git-commit)

Also, I am not too sure how practical Moritz's idea is. In order to get
that fine level of commit, org-mode will have to save the file after
each operation.


There are no threads in a.b.p.erotica,  so there's no  gain in using a
threaded news reader.
(Unknown source)

Attachment: pgpMXGjvlU1bO.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]