Robert Haas <robertmh...@gmail.com> wrote:
 
> What I'm interested in is being able to run 'git status' on a tree
> in which I've run a build without getting a lot of extra output,
> and that will require ignoring all the build products.
 
If you prefer to keep it all in one directory tree, something like
the following would work on Linux.  (The first of the two statements
would probably need a slight tweak to work on other *nix, but I'm
not sure of the best format.)
 
echo '# Globally ignore common build product patterns.

*.[oa]
*.so
*.so.*

# Ignore specific files.
' > .gitignore
git status | grep '^#[^ ]' | sed -e 's/#\t//' \
 -e '/^[^\/][^\/]*$/ s/^/\//' >> .gitignore
 
If you run that right after branching and building, you should be
set.  It produces the attached for me, which seems to work.  For me,
at least.  On kubuntu.
 
If we included and maintained the attached file in the repository,
it'd save running the above.  That seems reasonable to me, but I
don't care enough to argue over it.
 
-Kevin

Attachment: .gitignore
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to