Bug 540303 - Impossible to share a project when the GIT repository already contains an Eclipse project
Summary: Impossible to share a project when the GIT repository already contains an Ecl...
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: usability
: 540872 545200 (view as bug list)
Depends on:
Blocks: 545581
  Show dependency tree
 
Reported: 2018-10-19 08:02 EDT by Olivier Prouvost CLA
Modified: 2020-11-24 03:04 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Prouvost CLA 2018-10-19 08:02:56 EDT
I create .project files for my maven parent project in the root directory of my git repository. 

Unfortunaltely, it is not possible to share the project using share project. The work around is to delete the project from workspace and to copy it using the file system and then to reimport it from the git repositories view. Not really handy.
Comment 1 Eclipse Genie CLA 2018-10-22 10:41:39 EDT
New Gerrit change created: https://git.eclipse.org/r/131322
Comment 2 Thomas Wolf CLA 2018-11-07 04:00:27 EST
*** Bug 540872 has been marked as a duplicate of this bug. ***
Comment 3 Thomas Wolf CLA 2019-03-08 07:24:42 EST
*** Bug 545200 has been marked as a duplicate of this bug. ***
Comment 4 Lars Vogel CLA 2019-11-08 04:22:09 EST
I don't think Jonas, will have time to work on this any time soon -> setting the assignee to default.

Annoying workaround is:

- Switch to command line and delete project file
- Move project with Egit
- Restore project file
Comment 5 Lars Vogel CLA 2020-11-16 05:56:37 EST
Chenhui, please also have a look at this one. I run into this super annoying issue at least once per week and I have seen many customer struggling with this.
Comment 6 Thomas Wolf CLA 2020-11-24 03:04:48 EST
Ultimately the problems here boil down to platform not being able to move the project.

Another work-around is to delete the project to be shared in Eclipse (*not* deleting it on disk, of course), moving it on the command-line to the right place in the git repository's working tree directory, and then importing the project again from the repository.

Perhaps that gives an idea to solving this by making EGit do exactly these
steps under the hood instead of trying to do it via the Eclipse APIs.