title: Node.js modules pushed to GitHub
body: <p>I am trying to push my project to GitHub and Heroku. Since I am using Node.js in my app, I have folder <em>node_modules</em>. Before I commit I have created a file called <code>.gitignore</code> to ignore the Node.js modules.</p>
  <p>Inside the file I have added folder <em>node_modules</em> and tried to push to the GitHub repository from the comandline/Terminal. I was not expecting the Node.js modules to be pushed, but they appeared finally in the repository. Is there an ways I have to follow?</p>
  <h2>Here is how I resolve my issue</h2>
  <pre><code> - $ git rm -r --cached node_modules
  </code></pre>
  <p>Add folder <em>node_modules/</em> to your <em>.gitignore</em> file:</p>
  <pre><code> - $ git commit -m &quot;remove the ignored directory node_modules&quot;
  </code></pre>
  <p>And then</p>
  <pre><code> - $ git push origin master
  </code></pre>
  <p>After that, if you refresh the GitHub page you will see the <em>node_modules</em> folder gone.</p>