Frage

I currently have Fedora 17 inside a VM on my win7 computer. I want to configure the VM to manage my projects with git. I use eclipse helios on win7 with the egit plugin with my projects currently residing locally. Git and all the dependencies are already installed on the VM. The VM's hostname is dev.local and SSH is already installed, so I would use the following URL for access: ssh://john@dev.local:/php/projects/myframework.git

My question is, how do I initialize a new git repository on my VM and then push my local project up so that it's being managed by git in the VM?

War es hilfreich?

Lösung

OK, i finally figured it out. What I ended up doing was on my VM which is my Git server, was create my git directory:

# mkdir /home/brett/myproject.git && cd /home/brett/myproject.git

# git init --bare

On my client, in the project's folder (C:\www\myproject):

# git init

# git add .

# git commit -m "Initial commit"

# git remote add origin ssh://brett@dev.local/myproject.git

# git push origin master

I removed my client copy of the project and in eclipse, File > Import > Git > Project from Git, Select URI.

I plugged in the details to access the git repo on dev.local and was able to create a local copy in eclipse.

Anyways, thx everyone who took the time to reply to this. I actually found a decent article online which helped.

http://www.vogella.com/articles/EGit/article.html

Andere Tipps

run a git daemon in your vm. The git protocol would make it easier for you.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top