Alex T. Alex T. - 1 year ago 97
Git Question

Git doesn't commit a file in eclipse

I have a web project in Eclipse Neon, i use Spring MVC framework. I've made some changes in a Controller file, after commit+pull+push actions that controller file was removed from the other persons working on that git group. I've tried to delete and recreate that file, but when i try to commit git won't commit that file. Also the icon from that controller file doesn't have that little yellow thing like other files. I've tried add to index command and it does nothing. I've attached a pic of what is happening. How can i fix this problem?


Answer Source

It looks like the file has been added to .gitignore:

  1. In the Navigator view open the file .gitignore that is located in the same directory as the ignored file
  2. Remove the line that contains the file name
    • The previous ignored file will be decorated with a question mark
  3. Commit the file
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download