Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Eclipse Copy/Paste a project under local git control.
Eclipse Copy/Paste a project under local git control. [message #1786269] Sun, 29 April 2018 01:20 Go to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
When I do a copy then paste of a project under local git control the pasted project does not automatically go into the local git repo, it goes into the local workspace. How does one copy a project already under local git control and paste it so the new project is under local git control too?

Tutorials don't seem to cover this use case, which I would think is common.


Oxygen 3a
Windows 10
Re: Eclipse Copy/Paste a project under local git control. [message #1786270 is a reply to message #1786269] Sun, 29 April 2018 04:14 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
The dialog that comes up has a "Use default location" check box and that it checked by default (and defaults to locate the project physically nested in the workspace). You can uncheck it and use Browser... to locate it to be physically nested in your Git clone. You can also so this after the fact. I.e., from the context menu of the project, use Team -> Share..., choose the repo, and select a path within the repo.

Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Copy/Paste a project under local git control. [message #1786282 is a reply to message #1786270] Sun, 29 April 2018 11:35 Go to previous messageGo to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
When a CTL-C then CTL-V gets used there is no dialog in the Eclipse Package Explorer or the Eclipse Project Explorer.

There is no copy or paste in the Team Context menu either.

There is no copy or paste in the Git Repositories Context menu either.

What am i misunderstanding Ed?




Oxygen 3a
Windows 10
Re: Eclipse Copy/Paste a project under local git control. [message #1786283 is a reply to message #1786282] Sun, 29 April 2018 12:40 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Do I understand correctly where did you do Ctrl-C and then Ctr-V I wonder... If I do that on a project in the Package Explorer, the new Project has a duplicate name, so it must suggest a new name. It does for me. It's not possible to create two projects with the same name, so I'm not sure how what you're doing is possible...

In any case, I did explain how you can share a project after it exists. Did you try that?


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Copy/Paste a project under local git control. [message #1786320 is a reply to message #1786283] Mon, 30 April 2018 23:10 Go to previous messageGo to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
I tried to a Team -> Share Project.
I get errors about there being a .project file in my "Features" folder.
See attached screen captures.


Oxygen 3a
Windows 10
Re: Eclipse Copy/Paste a project under local git control. [message #1786352 is a reply to message #1786320] Tue, 01 May 2018 21:49 Go to previous messageGo to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
So i looked at prior backups of the my git repository and found that the .project file was not there at the git repository root directory. So it seems that somewhere between Neon and Oxygen this feature/bug got introduced.

The workaround for now is I have to delete the .project file from the parent directory each time a Team -> Share Project action is taken.

Ed do you think this is a bug? Or working as designed? I will open a bug report if you think it is a bug like I do.


Oxygen 3a
Windows 10
Re: Eclipse Copy/Paste a project under local git control. [message #1786361 is a reply to message #1786352] Wed, 02 May 2018 05:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
In my opinion, sharing a project should not create a .project file in the root of the Git working tree, nor in the parent, folder, nor in any folder. It should simply copy the project's underlying folder (which necessarily contains a .project file) to the folder within the working tree that you target. Only the target folder in the working tree should change...

If you're going to report a bug, which seems reasonable, please be sure to contain all the exact steps required to reproduce it in a fashion that the developers will be able to reproduce it locally...


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Eclipse Copy/Paste a project under local git control. [message #1786476 is a reply to message #1786361] Thu, 03 May 2018 23:46 Go to previous messageGo to next message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
Bug report created.

Bug 534337 - .project file gets added to the parent directory with each Team Share Project... of a new project. (edit)


Oxygen 3a
Windows 10
Re: Eclipse Copy/Paste a project under local git control. [message #1786650 is a reply to message #1786476] Tue, 08 May 2018 23:30 Go to previous message
Paul Roubekas is currently offline Paul RoubekasFriend
Messages: 207
Registered: March 2012
Location: Chattanooga, TN USA
Senior Member
Cause found.
The parent node of the git repository somehow got added as a project in the eclipse workspace. Because multiple Eclipse Working Sets were in use it was not obvious. Once the parent node of the git repository was delete as a project from eclipse, but not delete from the file system, the behavior stopped.
Bug will be closed.


Oxygen 3a
Windows 10
Previous Topic:Does EGit support Large File Storage (LFS)?
Next Topic:Can't add master branch
Goto Forum:
  


Current Time: Fri Apr 19 16:52:36 GMT 2024

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

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

Back to the top