Re: Add .gitignore files to CVS?

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: Add .gitignore files to CVS?
Дата
Msg-id 4B4C50A0020000250002E2A2@gw.wicourts.gov
обсуждение исходный текст
Ответ на Re: Add .gitignore files to CVS?  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Add .gitignore files to CVS?
Список pgsql-hackers
Robert Haas <robertmhaas@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

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: Typed tables
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: mailing list archiver chewing patches