Community
Participate
Working Groups
Hi, I have existing code and want to start tracking using EGit/JGit. When I tried to create a new git repo, I cannot continue because there is an error message "Directory XXX is not empty". I think creating repo in a non-empty directory should be allowed as it is normally done in command line: git init git add . git commit -m"Import existing code" The checking should instead check whether the selected directory is already a git repo. Regards,
You need to give more detail as it seems your procedure is what everybody else does, and it works for us.
See the following youtube video for illustration of the problem for possible enhancement http://www.youtube.com/watch?v=NNJNhcbCMLo
Please see the following youtube video for illustration of the problem for possible enhancement http://www.youtube.com/watch?v=btWjWXq2sz8
Instead of using the repository view to create the repository in the folder of the project, you could/should just use the "Share with git" wizard from the projects context menu. * Context menu "Team" -> "Share Project..." * Select "Git" and click "Next" * Then select "Use or create repository in parent folder of project" which is exactly what you want to archive * Select the project location * Click "Create Repository", which creates the repository immediately Using this wizard has also the advantage that EGit automatically knows that the project is shared using git. Otherwise you would have to use the "Share Project..." action and select the existing repository anyway.
(In reply to comment #4) > Instead of using the repository view to create the repository in the folder > of the project, you could/should just use the "Share with git" wizard from > the projects context menu. > > * Context menu "Team" -> "Share Project..." > * Select "Git" and click "Next" > * Then select "Use or create repository in parent folder of project" which > is exactly what you want to archive > * Select the project location > * Click "Create Repository", which creates the repository immediately > > Using this wizard has also the advantage that EGit automatically knows that > the project is shared using git. Otherwise you would have to use the "Share > Project..." action and select the existing repository anyway. exactly, this is the way how team providers connect an existing project to a repository