E
E
Evgeniy2016-02-01 10:39:17
git
Evgeniy, 2016-02-01 10:39:17

How to set an optional .gitignore filename for a repository? Is it possible?

How to set an optional .gitignore filename for a repository? Is it possible?
For example, for GIT to take the ignore rules from two files:
.gitignore
and
.gitignore_project1
Or only from .gitignore_project1

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Shumkin, 2016-02-01
@eZhrv

man git-config
core.excludesFile
In addition to .gitignore (per-directory) and .git/info/exclude, Git looks into this file for patterns of files which are not meant to be tracked. "~/" is expanded to the
value of $HOME and "~user/" to the specified user's home directory. 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. See gitignore(5).
from which, by the way, it follows that .gitignore is also taken into account in each project directory

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question