2

After any changes to the git repo, the .gitignore file is shown as modified when "git status":

modified: .gitignore
modified: someclass.java

It simply adds a new line "/bin/", so that after af few commits the .gitignore file looks like this:

bin/
/bin/
/bin/
/bin/

I am using Eclipse. How can I fix this?

Chris Maes
  • 35,025
  • 12
  • 111
  • 136
Anders
  • 719
  • 8
  • 22

1 Answers1

8

I suspect your are using Eclipse, since I had the same problem using Eclipse. If that is the case, EGit modifies .gitignore. You can disable this like this:

  • Under the Window menu, select Preferences.
  • Version Control (Team) > Git > Projects.
  • Deselect "Automatically ignore derived resources by adding them to .gitignore".

see related question

dangowans
  • 2,263
  • 3
  • 25
  • 40
Chris Maes
  • 35,025
  • 12
  • 111
  • 136
  • 2
    you're welcome. If your problem is solved, consider marking the answer as correct; so others can see that your problem is solved. – Chris Maes Apr 12 '15 at 11:02