Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Porject directory stucture wierdness
Porject directory stucture wierdness [message #756648] Mon, 14 November 2011 15:11 Go to next message
Mads M. Hansen is currently offline Mads M. HansenFriend
Messages: 14
Registered: July 2009
Junior Member
When I share a project

I get a repository like this

Reponame/
.git/
Projectname/
files
...

Is it possible to tell git to make a layout like this

Projectname/
.git/
files
...

Thanks in advance

.. Mads
Re: Porject directory stucture wierdness [message #756655 is a reply to message #756648] Mon, 14 November 2011 15:26 Go to previous messageGo to next message
Stefan Lay is currently offline Stefan LayFriend
Messages: 342
Registered: July 2009
Senior Member
So you want to have the .git folder below the Projectname/ folder?

Yes, that's possible.

- Create your project in eclipse.
- Open the Share projects wizard, select Git
- Check the checkbox "Use or create repository in parent folder of project"
- Select the project in the table
- Click the button "Create Repository"

Per default the new repository is created in the project folder, next to the .project file.
Re: Porject directory stucture wierdness [message #756671 is a reply to message #756655] Mon, 14 November 2011 15:58 Go to previous messageGo to next message
Mads M. Hansen is currently offline Mads M. HansenFriend
Messages: 14
Registered: July 2009
Junior Member
That will place the repository in the workspace - which is not recommended, is there any way to get egit to move it to ~/git ?
Re: Porject directory stucture wierdness [message #756746 is a reply to message #756671] Mon, 14 November 2011 19:20 Go to previous messageGo to next message
Mykola Nikishov is currently offline Mykola NikishovFriend
Messages: 58
Registered: July 2009
Member
On 11/14/2011 05:58 PM, Mads M. Hansen wrote:

> That will place the repository in the workspace - which is not
> recommended, is there any way to get egit to move it to ~/git ?

Just move your project outside of workspace.
Re: Porject directory stucture wierdness [message #756754 is a reply to message #756671] Mon, 14 November 2011 23:03 Go to previous messageGo to next message
Robin Rosenberg is currently offline Robin RosenbergFriend
Messages: 332
Registered: July 2009
Senior Member
Mads M. Hansen skrev 2011-11-14 16.58:
> That will place the repository in the workspace - which is not recommended, is there any way to get egit to move it to ~/git ?

The main issue is with having the .git directory *directly* under the workspace.

Create an extra directory for the project.

<workspace>/Repo/YourProject
<workspace>/Repo/.git

-- robin
Re: Porject directory stucture wierdness [message #756948 is a reply to message #756754] Tue, 15 November 2011 16:27 Go to previous messageGo to next message
Mads M. Hansen is currently offline Mads M. HansenFriend
Messages: 14
Registered: July 2009
Junior Member
Thanks, Robin. That cleared it up.
Re: Porject directory stucture wierdness [message #1767291 is a reply to message #756648] Tue, 04 July 2017 13:17 Go to previous message
Bernhard Donaubauer is currently offline Bernhard DonaubauerFriend
Messages: 2
Registered: June 2015
Junior Member
I guess I have the same need as the original poster. I have a github repository and I want to check in my project. I tried a lot now but it all ended in an extra directory in my local working tree and my remote git repository.

Example:

../myrepo/myproject/src

but I want:

../myrepo/src

I have two questions:
a) Is the mentioned method - create project, share it with "Use or create repository in parent folder of project" checked still the right way to go? Is there no direct way?
b) I don't understand the steps after create and share project. Would be somebody so kind and try to explain it to me like you would explain it to a child? I am a complete git beginner.

Regards,
Bernhard

[Updated on: Tue, 04 July 2017 14:01]

Report message to a moderator

Previous Topic:With command-line jgit, how to checkout a single file back to its git version?
Next Topic:Behavior divergence between Git and JGit on binary merge
Goto Forum:
  


Current Time: Mon Oct 23 11:48:41 GMT 2017

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

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