vkapustin vkapustin - 7 months ago 10
Java Question

How to not push certain directories/files to Github?

Specifically for Java Eclipse projects.

Is there a reason to have anything other than src and lib directories on github??

How much value does providing /bin, /settings .classpath, .project, etc.??

I'd like to have them on my local, but not displayed on github. Is there a way to do this?

Thanks!

EDIT:

contents of my .gitignore file (which is located in my local git project directory):

bin/
.settings/
.classpath
.project


I did a git add (to add this new .gitignore file) and a git commit to my local repo.

However, when I push to my remote github (https://github.com/VKkaps/Breakout) now, I still see everything including the .gitignore file now? Help?

Answer

The answer is .gitignore file. See: https://git-scm.com/docs/gitignore for more information.