Filipp
Filipp

Reputation: 133

Which files of a NetBeans project should be committed to repository?

I was wondering which files of a project should committed to a repository. For example, i've created the gitignore file for a project of mine, a java web app created with NetBeans. On gitignore.io i put the netbeans tag but i noticed that there's some files likes .properties or build.xml still not ignored. Should i ignore those ones too or not? And the META-INF and WEB-INF should be ignored too?

Thanks in advance

Upvotes: 1

Views: 1196

Answers (2)

No Name Pro
No Name Pro

Reputation: 170

GitHub has a repository with a lot of example .gitignore-Files.

Just collect your suggested Files and put all together in a .gitignore

Here is the .gitignore for NetBeans: https://github.com/github/gitignore/blob/master/Global/NetBeans.gitignore

Upvotes: 1

Eduardo Souza
Eduardo Souza

Reputation: 41

you can put this to your .gitignore:

##########################
## Java
##########################

*.class
.mtj.tmp/
*.war
*.ear
hs_err_pid*

##########################
## Maven
##########################

target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml

##########################
## NetBeans
##########################

nbproject/private/
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml

##########################
## IntelliJ
##########################

*.iml
.idea/
*.ipr
*.iws
out/
.idea_modules/

##########################
## Eclipse
##########################

.metadata
.classpath
.project
.settings/
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.loadpath

##########################
## OS X
##########################

.DS_Store

it has for Eclipse, IntelliJ, and Netbeans. Along with java/maven objects that should not be committed.

Upvotes: 3

Related Questions