Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Share project moves files(why are sources moved after share project)
Share project moves files [message #727459] Wed, 21 September 2011 11:14 Go to next message
Bertin Kiekebosch is currently offline Bertin KiekeboschFriend
Messages: 330
Registered: August 2011
Senior Member
I have some eclipse projects. After I shared the project the files are moved to an other location. From myWorkspace/myProject to git/myProject.

Why is this done by GIT and how does Eclipse know where the files are now because there is almost an empty workspace left.

Regards Bertin
Re: Share project moves files [message #727706 is a reply to message #727459] Wed, 21 September 2011 20:56 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
See [1] for explanations. If you still want to keep your project in the Eclipse workspace
click "Use or create repository in parent folder of project" in the sharing wizard.

Note: there is a plan to re-implement the sharing wizard to improve it's usability [2].

[1] http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse
[2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=356953
Re: Share project moves files [message #728348 is a reply to message #727706] Fri, 23 September 2011 04:37 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Matthias Sohn skrev 2011-09-21 22.56:
> See [1] for explanations. If you still want to keep your project in the
> Eclipse workspace
> click "Use or create repository in parent folder of project" in the
> sharing wizard.
>
> Note: there is a plan to re-implement the sharing wizard to improve it's
> usability [2].
>
> [1]
> http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse
>
> [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=356953

The motives in [1] aren't very relevant.

>The new Repository will consider the complete folder structure of the
>Eclipse workspace as (potential) content. This can result in
>performance issues, for example when calculating the changes before
>committing (which will scan the complete .metadata folder, for
>example); more often than not, the workspace will contain dead folders
>(e.g. deleted projects) which semantically are not relevant for EGit
>but can not be excluded easily.

When having repositories in the workspace, you normally don't create the
repository in the workspace root, but *below* the workspace. It
is possible to do it wrong, but the sharing wizard could alert you.

>The metadata (.git-) folder will be a child of the Eclipse Workspace.
>It is unclear whether this might cause unwanted folder traversals by
>Eclipse.

It is AFAIK clear that this is not an issue. I always have my projects
in my workspace, No problem whatsoever.

>You can easily destroy your Repository by destroying your Eclipse
Workspace

Isn't that obvious? Destroying any directory will destroy its' content.
With the workspace you at least have a notion that a repository is used.

The global folder now gives me a ton of experimental projects not used.
Wit workspace storgage those projects only appear in the workspace where
I use them.

Of course I'm biased, since I'm used to having projects in the workspace.

Import from team projectset is inconsistent with the sharing wizard, so
nowadays unsuspecting users will wind up with some projects in the
workspace and some in the shared git directory.

-- robin
Re: Share project moves files [message #1008141 is a reply to message #728348] Sun, 10 February 2013 21:41 Go to previous messageGo to next message
Jeff Miller is currently offline Jeff MillerFriend
Messages: 4
Registered: April 2011
Junior Member
As the original poster said, Egit moves files.

Here is my related question:

Since the project which was in an Eclipse workspace is now in a Git repository, it seems to me that all of the files from the project, even class files end up in the
repository. This seems to mean that even if I want to ignore class files, they will still be in the Git repository because they have to be someplace.

What would be okay is if my gitignore file somehow prevent class files from showing up
in the central repository when I push to remote but that doesn't seem to be happening -- the class files also show up in the remote repository.


Am I misinterpreting or doing something wrong?
Re: Share project moves files [message #1008251 is a reply to message #1008141] Mon, 11 February 2013 18:18 Go to previous message
Jeff Miller is currently offline Jeff MillerFriend
Messages: 4
Registered: April 2011
Junior Member
Actually, I was using .gitignore incorrectly -- everything seems to be working now.
Previous Topic:"Cherry pick failed"
Next Topic:ArchiveCommand
Goto Forum:
  


Current Time: Tue Mar 19 08:58:55 GMT 2024

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

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

Back to the top