0

I have been using git for some time now. For my project, I have created a .gitignore file which works well. As the project grows, I have started creating some files of my own (logs, scripts and so on) which I don't want to include in the repository. As of now, when I type git status, I see these files listed and I simply ignore them (which becomes more and more annoying as the list grows). The problem is that I also don't want to pollute the repo's public .gitignore file by adding all my personal stuff to it.

Is there a way to hide these files when I git status?

I have looked for some #include-like directive which all user could use to insert a personal list, but have found nothing so far. Does such an option exist?

BobMorane
  • 3,870
  • 3
  • 20
  • 42
  • @torek I would say that this is not a dupe of that question - OP does not necessarily want to apply the ignore rules globally. A more appropriate solution would be to use `.git/info/exclude` file. – 1615903 Sep 19 '17 at 03:48
  • A better dupe target: https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally – 1615903 Sep 19 '17 at 03:50
  • @1615903: I'll buy that. Both https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally and https://stackoverflow.com/questions/7335420/global-git-ignore are potential dups, depending on one's goals. – torek Sep 19 '17 at 06:11
  • 1
    Possible duplicate of [How do I configure git to ignore some files locally?](https://stackoverflow.com/questions/1753070/how-do-i-configure-git-to-ignore-some-files-locally) – 1615903 Sep 19 '17 at 06:18
  • +1 for the `.git/info/exclude` mentioned in the dup question, but do not run the `git update-index --assume-unchanged` command on any of your files – LeGEC Sep 19 '17 at 07:37

0 Answers0