title: How not to display the .class in git
body: <p>I don't want to display <code>.class</code> files when executing <code>git status</code>.</p>
  
  <p>I created a file named <code>.gitignore</code> and entered the <code>.class</code> in the file but nothing happened.</p>
  
  <p>What is the best way to prevent the <code>.class</code> file from being displayed when you execute <code>git status</code> command?</p>