Re: Additional git conversion steps

Поиск
Список
Период
Сортировка
От Christopher Browne
Тема Re: Additional git conversion steps
Дата
Msg-id AANLkTinDWY5H+a5C09RGzVXcarPx6JJdAjqa6V70BPzt@mail.gmail.com
обсуждение исходный текст
Ответ на Additional git conversion steps  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, Aug 17, 2010 at 2:21 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> There are a couple of things I think should happen ASAP once the git
> repository is up, but weren't mentioned in Magnus' plans:
>
> 1. The various .cvsignore files need to be replaced by .gitignore files.
> I am not sure though whether this is a trivial conversion --- does git
> have similar default rules about ignoring .o, etc?

Certainly, with two variations:

1.  If you don't want to hear about *.rej or *.orig files, you could
put relevant patterns into $GIT_DIR/.git/info/exclude

That's not checked in - that's configuration for one particular repo,
and that repo alone.

2.  You can create a .gitignore file in any directory, and check it
in; it'll indicate patterns to ignore in this directory and those
below.

So, you'd presumably do something like:  echo "*.o" >> $GIT_DIR/.gitignore
to deal with .o files  echo "*~" >> $GIT_DIR/.gitignore
so Emacs deteriorata gets ignored
and some other set of additions for typical "cruft" that is normally
safe to ignore.

The existing .cvsignore files can simply get renamed to .gitignore,
and that'll just work.

I had the entertaining case where, with Slony-I, I did, within the same commit: git rm .cvsignore git add .gitignore
(where I had copied data from one to the other)
and discovered that Git discovered that this was actually a "mv" request.

I frequently find myself doing a build of things, and then running: git status > .gitignore
which stows *all* the generated files, commented, so that they aren't
yet ignored.

Then, edit .gitignore, stripping off leading # for things that should
be ignored, and drop out anything that shouldn't be ignored.

git commit .gitignore -m "Populate all generated files that should be
ignored by Git"

This is one of the first things worth committing once Git gets turned on.
-- 
http://linuxfinances.info/info/linuxdistributions.html


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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: git: uh-oh
Следующее
От: Robert Haas
Дата:
Сообщение: Re: git: uh-oh