[eclipse] .gitignore file for java eclipse project

I have java project that uses the Eclipse IDE.

The Eclipse workspace is pointing to this directory:

/home/srvimgprd/BUSPROJ/code_development/dime/executables/clientcode/java_axis/Eclipse

I have placed a .gitignore file in the workspace directory "Eclipse". See below.

What I need to do is to be able to download the items from the Eclipse directory onto a new machine and then compile with no issue.

Are there any concrete steps to accomplish this task? When using the .gitignore file below, nothing shows up on the target machine.


CONTENTS OF ECLIPSE DIRECTORY (on source machine): /home/srvimgprd/BUSPROJ/code_development/dime/executables/clientcode/java_axis/Eclipse


java_axis/Eclipse> ls -lart
total 48
drwxr-xr-x 2 imgdev development 4096 2013-09-09 04:53 RemoteSystemsTempFiles
drwxr-xr-x 4 imgdev development 4096 2013-09-09 04:55 Servers
drwxr-xr-x 4 imgdev development 4096 2013-09-09 04:58 .metadata
drwxr-xr-x 6 imgdev development 4096 2013-09-09 05:06 Axis2ClientDimeServer
drwxr-xr-x 5 imgdev development 4096 2013-09-10 08:30 ..
-rw-r--r-- 1 imgdev development  307 2013-09-10 08:31 .gitignore
drwxr-xr-x 6 imgdev development 4096 2013-09-10 08:31 .

CONTENTS OF .gitignore FILE


*target*
*.jar
*.war
*.ear
*.class

# eclipse specific git ignore
*.pydevproject
.project
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

This question is related to eclipse git

The answer is


put .gitignore in your main catalog

git status (you will see which files you can commit)
git add -A
git commit -m "message"
git push

You need to add your source files with git add or the GUI equivalent so that Git will begin tracking them.

Use git status to see what Git thinks about the files in any given directory.


Examples related to eclipse

How do I get the command-line for an Eclipse run configuration? My eclipse won't open, i download the bundle pack it keeps saying error log strange error in my Animation Drawable How to uninstall Eclipse? How to resolve Unable to load authentication plugin 'caching_sha2_password' issue Class has been compiled by a more recent version of the Java Environment Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory How to downgrade Java from 9 to 8 on a MACOS. Eclipse is not running with Java 9 "The POM for ... is missing, no dependency information available" even though it exists in Maven Repository The origin server did not find a current representation for the target resource or is not willing to disclose that one exists. on deploying to tomcat

Examples related to git

Does the target directory for a git clone have to match the repo name? Git fatal: protocol 'https' is not supported Git is not working after macOS Update (xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools) git clone: Authentication failed for <URL> destination path already exists and is not an empty directory SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 GitLab remote: HTTP Basic: Access denied and fatal Authentication How can I switch to another branch in git? VS 2017 Git Local Commit DB.lock error on every commit How to remove an unpushed outgoing commit in Visual Studio?