Skip to main content



      Home
Home » Newcomers » Newcomers » gitignore without breaking workspace(gitignore without breaking workspace)
gitignore without breaking workspace [message #1732301] Sun, 15 May 2016 05:48 Go to next message
Eclipse UserFriend
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 07:22 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: gitignore without breaking workspace [message #1732314 is a reply to message #1732303] Sun, 15 May 2016 11:56 Go to previous messageGo to next message
Eclipse UserFriend
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 12:06] by Moderator

Re: gitignore without breaking workspace [message #1732317 is a reply to message #1732314] Sun, 15 May 2016 13:22 Go to previous message
Eclipse UserFriend
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)?
Previous Topic:[solved] Eclipse (Linux) force GTK2
Next Topic:Andry Dev
Goto Forum:
  


Current Time: Mon Jul 07 14:18:09 EDT 2025

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

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

Back to the top