1

I have a web project in Eclipse Neon. I've made some changes in a Java 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?

Pic

howlger
  • 31,050
  • 11
  • 59
  • 99
Buntom
  • 23
  • 5
  • It would be very helpful to see what `git status` is saying right now. It could be that someone else deleted that file, and you would have to make it tracked again first, before doing add to index from within Eclipse. – Tim Biegeleisen Jul 27 '17 at 06:14
  • Try create a new repository and commit,push again – John Joe Jul 27 '17 at 06:17
  • [link](http://imgur.com/a/SNKYU) I've tried to delete and recreate that file, no changes, i'm pretty new to git – Buntom Jul 27 '17 at 06:18
  • https://stackoverflow.com/questions/27828404/why-does-git-status-show-branch-is-up-to-date-when-changes-exist-upstream – John Joe Jul 27 '17 at 06:20
  • @JohnJoe That is like the very last resort. And why should this help in the first place ... – GhostCat Jul 27 '17 at 06:27

1 Answers1

2

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
howlger
  • 31,050
  • 11
  • 59
  • 99