+4 votes
1 view
in DevOps and Agile by (20k points)
edited by

I have a repository with a file Hello.java. When I compile it an additional Hello.class file is generated.

I created an entry for Hello.class in a .gitignore file. However, the file still appears to be tracked.

I want to know how to make git ignore Hello.class.

1 Answer

+4 votes
by (28.4k points)
edited by

In order to ignore:

$ git update-index --assume-unchanged <path/to/file>

In order to undo ignore:

$ git update-index --no-assume-unchanged <path/to/file>

For more information:

Welcome to Intellipaat Community. Get your technical queries answered by top developers !