From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter BARABAS Subject: Re: Keeping your history for org files Date: Sat, 15 Nov 2008 16:51:45 +0000 (UTC) Message-ID: References: <87tzilzgkv.fsf@gollum.intra.norang.ca> <47F37096.3080705@diplan.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1L1OQb-00042w-Ou for emacs-orgmode@gnu.org; Sat, 15 Nov 2008 11:55:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1L1OQZ-00042k-A3 for emacs-orgmode@gnu.org; Sat, 15 Nov 2008 11:55:20 -0500 Received: from [199.232.76.173] (port=50880 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1L1OQZ-00042h-4g for emacs-orgmode@gnu.org; Sat, 15 Nov 2008 11:55:19 -0500 Received: from main.gmane.org ([80.91.229.2]:45036 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1L1OQY-0005ix-TO for emacs-orgmode@gnu.org; Sat, 15 Nov 2008 11:55:19 -0500 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1L1OQI-00005J-Fx for emacs-orgmode@gnu.org; Sat, 15 Nov 2008 16:55:02 +0000 Received: from hf1far2p0w.adsl.datanet.hu ([91.120.89.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2008 16:55:02 +0000 Received: from peter.barabas+orgmode by hf1far2p0w.adsl.datanet.hu with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Nov 2008 16:55:02 +0000 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Rainer Stengele diplan.de> writes: Hello, > > > > ------------------------------------------------------------------------ > > * Creating commits automatically > > ------------------------------------------------------------------------ > > > > Then I added a cron job on my workstation which commits changes to the > > repository automagically. I decided commits once per hour is enough for > > me so I added the following crontab entry: > > > > $ crontab -e > > > > ,----[ My crontab entry ] > > | 0 * * * * cd ~/git/org && git add . && git commit -m "$(date)" >/dev/null > > `---- > > > > and I'm done. This picks up all my .org and .org_archive files and > > tracks changes hourly. > > > > If I change a file a new commit gets created on the next hour. If > > nothing changes no commit is created since there is nothing to add. > > I'm using a similar setup, but with a hook: (defun git-commit () (when (eq major-mode 'org-mode) (shell-command "git commit -a -m 'Auto commit.'"))) (add-hook 'after-save-hook 'git-commit) This way, after I save the file it gets commited. Regards, Peter BARABAS.