Dave Abrahams <d...@boostpro.com> 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