From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: Org, Diffs, and Version Control Date: Sun, 16 Oct 2011 10:51:40 -0400 Message-ID: <87pqhxng5f.fsf@norang.ca> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:54065) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFS45-0004UJ-Bv for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 10:51:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RFS43-0008R1-BQ for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 10:51:49 -0400 Received: from mho-03-ewr.mailhop.org ([204.13.248.66]:57984 helo=mho-01-ewr.mailhop.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RFS43-0008Qj-4P for emacs-orgmode@gnu.org; Sun, 16 Oct 2011 10:51:47 -0400 In-Reply-To: (Dave Abrahams's message of "Sun, 16 Oct 2011 10:25:32 -0400") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Dave Abrahams Cc: emacs-orgmode@gnu.org Dave Abrahams writes: > As I've been working on a fairly large Org outline over the past few > days, I've discovered that the format is very ill-suited to management > and review by (known) version control tools, like Git. Indentation is > always changing and volatile information like tags and priorities > tends to mix with headlines, which makes diffs very hard to track. This > is to say nothing of the fact that diff itself is a poor format for > understanding changes that simply reorganize parts of documents. > > I was wondering what other people do. I want to make sure I understand > the changes I'm making to my document and that I haven't unintentionally > wiped out a great deal of important material (all the more likely to > happen without me noticing because of Org's folding). > > Hints most appreciated, The main thing I do is use org-indent-mode so indentation is not a factor in the diffs. Everything starts at column 1 and moving things around and promoting headlines doesn't change the indent of the items. I also use 'git log --stat' to get a quick overview of my hourly commits to reassure myself that large parts of the document didn't get removed by accident. I normally only do this after archiving (which is monthly) but this also makes is relatively easy to identify a commit where a large block of content was removed in the event I want to restore the old content. I rarely have to resort to my git history to restore something (maybe 2 times a year?) but I really like the safety net of my hourly git commits on my org-files so I can be confident I won't permanently lose anything which is important to me. HTH, Bernt