.git/info/exclude is a per-repository .gitignore file that is
not distributed when you push, clone, etc.
It sounds like you'll need a different setup to accomplish
this, though. It sounds like you need two branches:
let's call them "public" and "private".
Your "private" branch would be a superset of the "public"
branch.
The public branch would be used to edit anything that's meant
for public consumption.
The private branch should never touch the public parts;
it should only ever modify the files that you've deemed
private. To pickup changes to public stuff you'd simply
git merge public.
Whenever you need to change any of the private bits you
simply checkout the private branch and commit stuff there.
Distributing your repo is simple now that you have the
two branches. Simply push the public branch out to the
public repositories and never push the private branch
there.
The "private is a superset of public" is enforced by
the merging strategy -- all the public work happens
in the public branch and the private branch merges
those changes in periodically:
# merge public into private
$ git checkout private
$ git merge public
Never merge the other way (private into public) and
you're set.
--
David
I think remote repository specific .gitignore directives could also be
used to more easily manage subprojects if implemented internally. What
do you think?
I do intend to build git myself one of these days so this is partially
a wish, and partially a request for comment... Or maybe i just need to
understand the subproject handling of git a little better
The recipe David gave you is the most appropriate.
The ignore mechanism is about what to do with untracked files (i.e. "do
you want to get reminded that you might have forgotten to 'git add'
them?"). When you are talking about committed files (and merge, push,
commit are all about commited files), gitignore never gets into the
picture.