title: Add existing project to Github without initializing .gitignore
body: <p>I usually add an existing project to Github using the following documentation..
  <a href="https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/" rel="nofollow">https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/</a></p>
  
  <p>The documentation also says..
  <strong>To avoid errors, do not initialize the new repository with README, license, or gitignore files. You can add these files after your project has been pushed to GitHub.</strong></p>
  
  <p>So now when I push the changes for the first time all the unnecessary <strong>jar files/target directory/ide</strong> files get pushed. I then manually exclude those files by adding .gitignore like this..</p>
  
  <pre><code>$ echo '.idea' &gt;&gt; .gitignore
  $ git rm -r --cached .idea
  $ git add .gitignore
  $ git commit -m '(some message stating you added .idea to ignored entries)'
  $ git push
  </code></pre>
  
  <ol>
  <li>Can I prevent adding all these unneeded files first time itself?</li>
  <li>After deleting the unneeded files (target,jar,ide files) and adding them to .gitignore, I have verified that they no longer exist in github, but when I clone the url its still 100MB, the actual download size is however less than 1MB? Can someone clarify this. </li>
  </ol>