I am still new to git. Since I do not need my repository to be publicly available, I chose Bitbucket. As my desktop client I use Atlassian Sourcetree.
I am working on a Java project using Eclipse IDE. Just like everyone, I do not need the class files to be visible in changed files, however those files have already been committed and pulled into my remote repository.
Now I need SourceTree to not to show those class files as changed files whenever I make a change to .java
file.
As I have understood by coming through so many questions and answers, the entry in the .gitignore
file alone cannot simply ignore the class files since they have already been committed and pulled.
For that, as I understand, what I should do is ignore the file in source tree and commit it. Then only the entry in the .gitignore
file would do what we need. (This is my understanding. Please correct me if I am wrong).
What my problem now is, the ignore
option is grayed out; so as a solution for that the community suggest to first select the Stop Tracking
option and then select the ignore
option. But when I do Stop Tracking, no change appears.
As per the community, the file should be marked with a blue icon. But it is not in my case. Even though I didn't get change of the icon, I then tried to select the ignore option. But still it is grayed out. Even after doing these steps, when I make a change to .java
file, the .class
file appears in the changed files list.
What is wrong here? Why I am not getting the job done? What have I done wrong?