{"thread":{"id":"33064","subject":"Configurable .gitignore filename?","startedAt":"2013-03-04T11:58:39Z","lastAt":"2013-03-05T10:28:49Z","messageCount":5,"participants":["Jari Pennanen","Matthieu Moy","David Aguilar"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"210575","messageId":"CACoicv+Hq=d5fJ7PXYdyvOdWmc3-GbFrsAf2Ze7dnQTzjExXnw@mail.gmail.com","threadId":"33064","inReplyTo":null,"subject":"Configurable .gitignore filename?","fromName":"Jari Pennanen","fromEmail":"jari.pennanen@gmail.com","sentAt":"2013-03-04T11:58:39Z","receivedAt":"2013-03-04T11:58:39Z","isPatch":false,"sender":{"key":"jari.pennanen@gmail.com","avatar":null},"body":"If project or directory belongs to more than one GIT_DIR then some of\nthe GIT_DIR's may need a different .gitignore files, it would be\nuseful if one could define it independently, e.g. in GIT_DIR/config:\n\n[core]\nignorefilename = .gitalternateignore\n\nHas anyone considered making the .gitignore filename configurable? It\ncould be in a config file or env variable, but either way it would be\nhandy to be configurable. I'm not familiar with git's structure, but\nif ignoring is only used in git-add then I suppose I could make own\ngit-add script if this is not implemented in core git.\n\nI intend to use GIT as a rsync replica (or Dropbox replica) cause it\nsuits it better than rsync, since GIT doesn't have to check all files\neach time I sync (and GIT can contain versions / backups, works better\non Windows and has a simpler needs for the server), more about why I\nneed this: https://groups.google.com/forum/#!topic/git-users/E-Au9P0A6NA/discussion%5B1-25-false%5D\n\n- Jari\n"},{"id":"210577","messageId":"vpqzjyjp8y0.fsf@grenoble-inp.fr","threadId":"33064","inReplyTo":"CACoicv+Hq=d5fJ7PXYdyvOdWmc3-GbFrsAf2Ze7dnQTzjExXnw@mail.gmail.com","subject":"Re: Configurable .gitignore filename?","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@grenoble-inp.fr","sentAt":"2013-03-04T13:53:59Z","receivedAt":"2013-03-04T13:53:59Z","isPatch":false,"sender":{"key":"matthieu.moy@grenoble-inp.fr","avatar":"https://gravatar.com/avatar/72c8a2705971a25dfaff23cece15130d405685845d911aedd5667ace277f3fc5?d=mp&s=160"},"body":"Jari Pennanen <jari.pennanen@gmail.com> writes:\n\n> If project or directory belongs to more than one GIT_DIR then some of\n> the GIT_DIR's may need a different .gitignore files, it would be\n> useful if one could define it independently, e.g. in GIT_DIR/config:\n>\n> [core]\n> ignorefilename = .gitalternateignore\n\nThere is already core.excludesfile, which does not replace the usual\n.gitignore but comes in addition. The common use is a user-wide ignore\nfile, not a per-directory one.\n\n-- \nMatthieu Moy\nhttp://www-verimag.imag.fr/~moy/\n"},{"id":"210578","messageId":"CACoicvKMWSjU6Lf-2PsCShzqGiX-=2xF9+W0EtrHUzWPU7-T_A@mail.gmail.com","threadId":"33064","inReplyTo":"vpqzjyjp8y0.fsf@grenoble-inp.fr","subject":"Re: Configurable .gitignore filename?","fromName":"Jari Pennanen","fromEmail":"jari.pennanen@gmail.com","sentAt":"2013-03-04T15:47:26Z","receivedAt":"2013-03-04T15:47:26Z","isPatch":false,"sender":{"key":"jari.pennanen@gmail.com","avatar":null},"body":"2013/3/4 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:\n> There is already core.excludesfile, which does not replace the usual\n> .gitignore but comes in addition. The common use is a user-wide ignore\n> file, not a per-directory one.\n\nI'm actually aware of that. Problem is the normal .gitignore files\nmust *not* be used in the second GIT_DIR at all, in my case it's for\nsyncing so I need to sync almost all files (including stuff inside\n.gitignore), though I'd still like to retain some ignore files for\nsecond GIT_DIR, e.g. like in rsync the .rsync-filter file.\n"},{"id":"210618","messageId":"CAJDDKr55ayTpzXPG3j5czY=-W08L8QjhMmjqWdRpoWO=MpHdyg@mail.gmail.com","threadId":"33064","inReplyTo":"CACoicvKMWSjU6Lf-2PsCShzqGiX-=2xF9+W0EtrHUzWPU7-T_A@mail.gmail.com","subject":"Re: Configurable .gitignore filename?","fromName":"David Aguilar","fromEmail":"davvid@gmail.com","sentAt":"2013-03-05T09:59:41Z","receivedAt":"2013-03-05T09:59:41Z","isPatch":false,"sender":{"key":"davvid@gmail.com","avatar":"https://avatars.githubusercontent.com/u/13196?v=4"},"body":"On Mon, Mar 4, 2013 at 7:47 AM, Jari Pennanen <jari.pennanen@gmail.com> wrote:\n> 2013/3/4 Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>:\n>> There is already core.excludesfile, which does not replace the usual\n>> .gitignore but comes in addition. The common use is a user-wide ignore\n>> file, not a per-directory one.\n>\n> I'm actually aware of that. Problem is the normal .gitignore files\n> must *not* be used in the second GIT_DIR at all, in my case it's for\n> syncing so I need to sync almost all files (including stuff inside\n> .gitignore), though I'd still like to retain some ignore files for\n> second GIT_DIR, e.g. like in rsync the .rsync-filter file.\n\nHow about .git/info/exclude in the 2nd GIT_DIR?  Would that help?\n-- \nDavid\n"},{"id":"210619","messageId":"CACoicvK77mepwk-n9ZQ7TtCnMZfqDVycg_CgH5zHE3u6=KxHog@mail.gmail.com","threadId":"33064","inReplyTo":"CAJDDKr55ayTpzXPG3j5czY=-W08L8QjhMmjqWdRpoWO=MpHdyg@mail.gmail.com","subject":"Re: Configurable .gitignore filename?","fromName":"Jari Pennanen","fromEmail":"jari.pennanen@gmail.com","sentAt":"2013-03-05T10:28:49Z","receivedAt":"2013-03-05T10:28:49Z","isPatch":false,"sender":{"key":"jari.pennanen@gmail.com","avatar":null},"body":"2013/3/5 David Aguilar <davvid@gmail.com>:\n> On Mon, Mar 4, 2013 at 7:47 AM, Jari Pennanen <jari.pennanen@gmail.com> wrote:\n>> I'm actually aware of that. Problem is the normal .gitignore files\n>> must *not* be used in the second GIT_DIR at all, in my case it's for\n>> syncing so I need to sync almost all files (including stuff inside\n>> .gitignore), though I'd still like to retain some ignore files for\n>> second GIT_DIR, e.g. like in rsync the .rsync-filter file.\n>\n> How about .git/info/exclude in the 2nd GIT_DIR?  Would that help?\n\nThe second GIT_DIR must not use the .gitignore files of the first\nGIT_DIR, so it does not help.\n\nOnly way to skip the .gitignore files in git-add is to use \"git add -f\n.\" but that skips all excludes, including the .git/info/exclude. I\nneed to skip .gitignore files used by the other GIT_DIR and still have\nsome of ignore rules, IMO this is not possible at the moment.\n"}]}