Re: [hackers] [sbase] [PATCH] Add .gitignore

From: Michael Forney <>
Date: Mon, 17 Jun 2019 14:01:03 -0700

On 2019-06-17, Quentin Rameau <> wrote:
>> How do you deal with ~250 lines of "Untracked files:" in the `git
>> status` output?
>> If you want to see them, you can always run `git status --ignored`.
> If you want it, you can always run `make .gitignore` *once*.

Once for every clone of sbase.

>> >> The place for user-specific and repository-specific ignored files is
>> >> .git/info/exclude. But in general, we don't know the location of the
>> >> .git directory, so we'd probably have to use some git command to
>> >> figure out exactly where to put it.
>> >
>> > There's no “we”, that's the user's responsability to figure out where
>> > to put it.
>> There is a "we" if a Makefile rule were to be added, since it needs to
>> create the file at the appropriate location.
> The appropriate location is .gitignore.

No, see gitignore(5):

* Patterns which should be version-controlled and distributed to other
  repositories via clone (i.e., files that all developers will want to
  ignore) should go into a .gitignore file.

* Patterns which are specific to a particular repository but which do
  not need to be shared with other related repositories (e.g., auxiliary
  files that live inside the repository but are specific to one user’s
  workflow) should go into the $GIT_DIR/info/exclude file.

* Patterns which a user wants Git to ignore in all situations (e.g.,
  backup or temporary files generated by the user’s editor of choice)
  generally go into a file specified by core.excludesFile in the user’s
  ~/.gitconfig. Its default value is $XDG_CONFIG_HOME/git/ignore. If
  $XDG_CONFIG_HOME is either not set or empty, $HOME/.config/git/ignore
  is used instead.

>> > What's the rationale for having it duplicated both in the SCM and in
>> > the
>> > Makefile then?
>> So that if a utility is added or removed, .gitignore can easily be kept in
>> sync.
> So what's the point of having .gitignore tracked by the SCM?

So that it gets applied by default.
Received on Mon Jun 17 2019 - 23:01:03 CEST

This archive was generated by hypermail 2.3.0 : Mon Jun 17 2019 - 23:12:24 CEST