Search code examples
gitsourcetree

remove .gitignore from the staging


I have only one problem with git, and it is that I have the .gitignore is trying to be added in the repo, but i don't want it to be, and how do you ignore the ignore file? I don't ever want to see .gitignore anywhere.

I have tried to ignore it, but i can only discard it or remove it, and that is definitely not what i want to do.

enter image description here


Solution

  • To maintain a list of files to ignore, that is not part of your repository, don't use the .gitignore file. Instead, edit .git/info/exclude, which won't ever get added to the repository.