From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Lawrence Subject: Re: Conditional .gitignore for org-mode files Date: Mon, 27 Apr 2015 08:11:05 -0700 Message-ID: <87tww1k3na.fsf@berkeley.edu> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35620) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmkhJ-0006jl-9s for emacs-orgmode@gnu.org; Mon, 27 Apr 2015 11:11:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YmkhF-0008J9-Az for emacs-orgmode@gnu.org; Mon, 27 Apr 2015 11:11:49 -0400 Received: from plane.gmane.org ([80.91.229.3]:43783) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YmkhF-0008Io-54 for emacs-orgmode@gnu.org; Mon, 27 Apr 2015 11:11:45 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Ymkh8-0003uU-J0 for emacs-orgmode@gnu.org; Mon, 27 Apr 2015 17:11:38 +0200 Received: from c-67-169-117-151.hsd1.ca.comcast.net ([67.169.117.151]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Apr 2015 17:11:38 +0200 Received: from richard.lawrence by c-67-169-117-151.hsd1.ca.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 27 Apr 2015 17:11:38 +0200 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: David Dynerman Hi David, David Dynerman writes: > Sorry in advance, this might be more of a git question than an org-mode > question, but I thought someone on this list might know the answer. > > Is it possible to conditionally gitignore certain files based on files > that are being tracked? > > What I'd like is something like the following gitignore logic: > > if filename.org is tracked by git: > ignore filename.tex, filename.html > > If this isn't possible, does anyone have any nice setups for ignoring > exported versions of org-mode files? Unfortunately, I don't know how to do what you asked, but what I tend to do in this situation is to run my exports in a build/ subdirectory, and then add build* to my .gitignore. Maybe that would work for you? Best, Richard