Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » [Newbie] New Repository without moving original files
[Newbie] New Repository without moving original files [message #1062431] Fri, 07 June 2013 16:28 Go to next message
christophe meudec is currently offline christophe meudec
Messages: 1
Registered: June 2013
Junior Member
Hi all,
I am trying to do something very basic that my students want to do all the time:

1. they have an existing project Eclipse (e.g. a Java project)
2. they want to put it in a local repository: they use the EGit wizard Team->Share.

There are two options here: one is the to use the project as parent directory for the local repository but that is not recommended and I understand why, so we don't do that.

The only other option, is to create a repository elsewhere on the local machine: I go ahead, all seems fine, EXCEPT that all my original files have been deleted and moved, all works as before but my original files are not where they ere before.

I don't want my original files to be moved, but I still want to create a local repository on my machine for my Eclipse project: how do I do that with EGit?

I have really banged my head on this for the past 4 hours and I don't know how to do it.

Many thanks,
Chris

Re: [Newbie] New Repository without moving original files [message #1062593 is a reply to message #1062431] Sun, 09 June 2013 15:52 Go to previous message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
You can use the EGit 'share' dialog to create the new repository one level up in the file hierarchy. Initially the project won't appear to be under version control, but it will if you soft-delete and reimport it . A little awkward but not a big deal for a one-time-only operation.

Another option is to create a minimal second project as a sibling of the first one. If you then share both at once, EGit will do exactly what you want. Presumably you'll be adding at least one more project eventually, otherwise the single-project repository structure would have been fine in the first place.

If you don't like either of these options, use command-line Git, which your students need to learn anyway. Git is too rich of a system for any gui to capture it completely.

Previous Topic:Use of RepositoryListener (especially RefsChangedListener)
Next Topic:Should JGit have its own forum?
Goto Forum:
  


Current Time: Tue Oct 21 13:55:37 GMT 2014

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

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