Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I add org.eclipse.core.resources.prefs to gitignore?

What regex do I use to add org.eclipse.core.resources.prefs to my .gitignore, so that it ignores all occurrences of this file?

Adding each occurrence separately or any regex like //org.eclipse.core.resources.prefs or /./org.eclipse.core.resources.prefs does not seem to help.

like image 416
Karthick S Avatar asked Sep 12 '25 19:09

Karthick S


1 Answers

Adding org.eclipse.core.resources.prefs will work. However, I'm guessing that you committed the files to your repository already. .gitignore will not ignore files that have already been committed. So, you need to:

  1. remove all org.eclipse.core.resources.prefs files from the repo
  2. add line to gitignore
  3. commit gitignore

And all of your prefs files will be ignored afterwards.

like image 161
Andrew Eisenberg Avatar answered Sep 15 '25 12:09

Andrew Eisenberg