Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » gitignore without breaking workspace(gitignore without breaking workspace)
gitignore without breaking workspace [message #1732301] Sun, 15 May 2016 09:48 Go to next message
cristian ambaek is currently offline cristian ambaekFriend
Messages: 6
Registered: March 2014
Junior Member
Hi all

I work with Java projects using git between multiple PC's, and have been trying to use the .gitignore file to ignore automatic generated files from Eclipse that does not need to be shared between my PC's without breaking project so i still can import projects as a whole and not over writing the IDE settings between PC's.

So far i havn't had much luck since i either ignore to little or to much, so my question are.

What files from Eclipse can you with ease ignore without breaking the overall project so i still can import projects as a whole in Eclipse and not overwrite Eclipse settings from one IDE to the next?

Thanks on advance
Kind regards
Re: gitignore without breaking workspace [message #1732303 is a reply to message #1732301] Sun, 15 May 2016 11:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Cristian,

For our project, we put a .gitignore like this in the root to ignore all
bin folders. All our Java projects use the bin folder for the .class
files.

bin/

That's mostly all we need to ignore.

There's also a preference, Team -> Git -> Project for "Automatically
ignore derived resources by adding them to .gitignore; generators will
often set the Derived attribute on an IFile if it's generated/derived,
and those could be automatically ignored.

Definitely don't ignore some of the hidden files like .project,
..classpath, and most of what's in .settings/*

If you have something more specific you're not sure about, ask a more
specific question.

On 15.05.2016 11:48, cristian ambaek wrote:
> Hi all
>
> I work with Java projects using git between multiple PC's, and have
> been trying to use the .gitignore file to ignore automatic generated
> files from Eclipse that does not need to be shared between my PC's
> without breaking project so i still can import projects as a whole and
> not over writing the IDE settings between PC's.
>
> So far i havn't had much luck since i either ignore to little or to
> much, so my question are.
>
> What files from Eclipse can you with ease ignore without breaking the
> overall project so i still can import projects as a whole in Eclipse
> and not overwrite Eclipse settings from one IDE to the next?
>
> Thanks on advance
> Kind regards


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: gitignore without breaking workspace [message #1732314 is a reply to message #1732303] Sun, 15 May 2016 15:56 Go to previous messageGo to next message
cristian ambaek is currently offline cristian ambaekFriend
Messages: 6
Registered: March 2014
Junior Member
Thanks for the reply!

What about the metadata folder, can that be ignored?

If Eclipse sees that it is missing a file that contains metadata it will just create it?

[Updated on: Sun, 15 May 2016 16:06]

Report message to a moderator

Re: gitignore without breaking workspace [message #1732317 is a reply to message #1732314] Sun, 15 May 2016 17:22 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33113
Registered: July 2009
Senior Member
Cristian,

You should *not* keep in the workspace itself in Git. The workspace
folder should *not* be the clone. Generally the clone folder is a
separate folder and you import your projects into a workspace; such
projects are essentially like symbolic links to folder in your clone.
You should look at how other projects are structured in Git, e.g., you
could look at the Oomph project's structure:

http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/tree/

Or any other project hosted at Eclipse.


On 15.05.2016 17:56, cristian ambaek wrote:
> Thanks for the reply!
>
> What about the metadata folder, can that be ignored without breaking
> projects (so you cant import or work with them)?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[solved] Eclipse (Linux) force GTK2
Next Topic:Andry Dev
Goto Forum:
  


Current Time: Thu Mar 28 17:50:47 GMT 2024

Powered by FUDForum. Page generated in 0.03617 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top