0

I've worked with SVN all my life and, right now, I'm trying to learn a little about GIT. In order to do so, I have created a local private GIT server in a RaspBerry and connected it to my Eclipse.

Until now, I have created a folder in the raspberry (/home/pi/raspberry-repo.git/ ) and formatted it as a GIT repository ( git init --bare ) creating the following directory structure:

That is the structure created by such command

I have also successfully connected Eclipse via SSH to such repository but I have some question that may be conceptual in nature:

  • I already have 2 local projects in Eclipse and I have executed the Team>Share Project in them, in order to add them to the LOCAL repository in my PC. After that, I have made some commits in both projects to such local repository and pushed the changes to the remote repository in the raspberry. My doubt appears when I look the GIT perspective in Eclipse.

In SVN the usual structure is:

SVN structure

but in GIT the structure seems to be this:

enter image description here

So, AFAIK in order to download a project from a remote repository I must File>Import>Projects from GIT, select the branch and the project in such branch.

Is all this correct?

  • Should I use just one project per repository? (Create a folder in the raspberry for each project )

  • Another question is why I'm unable to see any proper file from my projects when I browse throught the Raspberry filesystem (I just see a new folder inside of the Objects folder for each commit). The repository is not stored in plain text... Is that normal or I'm making some mistake when configuring the repository folder in the raspberry?

Hope you have patience with this doubts! By the way, any GOOD tutorial is welcome (the ones I have found aren't very good)

Jesus Schneider
  • 103
  • 1
  • 11
  • Ok, [link](https://stackoverflow.com/questions/7861184/what-is-the-difference-between-git-init-and-git-init-bare). This answers my last question, 2 more left... – Jesus Schneider Jan 16 '18 at 17:25
  • No, a purely remote repository is usually "bare" (the working directory is empty or unusable) so as to avoid conflicts when you push changes to it. That's normal. – nitind Jan 16 '18 at 19:06
  • That's what I said, any help with my 2 other questions? – Jesus Schneider Jan 16 '18 at 19:09
  • 1
    There's no reason not to have more than one project in a repository if it makes sense to you. That specific wizard can work, but I tend to do it the long way. https://wiki.eclipse.org/EGit/User_Guide#Cloning_or_adding_Repositories – nitind Jan 16 '18 at 20:28

0 Answers0