From mboxrd@z Thu Jan 1 00:00:00 1970 From: "John Wiegley" Subject: Using git-annex with org-attach Date: Sat, 20 Oct 2012 07:59:09 -0700 Message-ID: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:39306) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPeIY-0000NV-8b for emacs-orgmode@gnu.org; Sat, 20 Oct 2012 15:01:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TPeIX-0004m8-8l for emacs-orgmode@gnu.org; Sat, 20 Oct 2012 15:01:26 -0400 Received: from mail-ie0-f169.google.com ([209.85.223.169]:33408) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TPeIX-0004m2-4I for emacs-orgmode@gnu.org; Sat, 20 Oct 2012 15:01:25 -0400 Received: by mail-ie0-f169.google.com with SMTP id 10so2693760ied.0 for ; Sat, 20 Oct 2012 12:01:24 -0700 (PDT) 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: emacs-orgmode@gnu.org Cc: Joey Hess I pushed a change to master that allows you to use the wonderful git-annex utility[1] seamlessly with org-attach. The way it works is as follows: 1. If your `org-attach-directory' is a git working tree, 2. and if you have run "git annex init" there, 3. and if `org-attach-git-annex-cutoff' is non-nil and smaller than the size of the file you're attaching, 4. then org-attach will "git annex add" the file; otherwise it will "git add" it. (See the documentation for git-annex to discover exactly what this distinction means; basically it's the difference between "stored in Git forever", and "check-summed and tracked until I decide I don't need it on this machine anymore"). 5. You will have to run "git annex sync" yourself afterwards, or use the "git annex assistant" to keep your attachments automagically in sync with all your machines whenever they are reachable. The value of git-annex is that it lets you associate truly huge files with a Git repository that are check-summed and easily archived, which you can then drop from your local attachments directory when you no longer need the file there. Later, if you need files that you dropped, use `C-c C-a F' and `M-! git annex get . RET' to re-download those attachments back into your local repo. John Footnotes: [1] http://git-annex.branchable.com/