A file outside the repository (.git/info/exclude) can replace this and suits better for this usecase.