1

I am setting up a development environment in my home. I have installed a centos linux in a virtual machine. All files in /var/www/html are shared with samba.

I have access to these files in windows. I have installed git in centos. I created a git repository in a sub directory of /var/www/html.

I am using Eclipse in windows. Egit is installed in Eclipse. I tried to add repository in eclipse but when I do a commit in egit, "git status" in linux displays a list of modified files to commit. Also when I do a commit in linux, all files in egit will be marked az modified.

I don't know how to synchronize egit with git. What is the correct way to do this?

1 Answers1

0

The easiest solution by far would be to use a cloud service such as GitHub (or BitBucket if you want free private repositories).

An example workflow is (on terminal, however your clients will have GUI options for this):

$ git remote add origin git@bitbucket.org:username/repository
$ git push origin master

The on your other client fetch the changes and merge them in through pull

$ git pull

Both sides will need to have the same remote repository - This way you can push - pull wherever you do the work and the code be the same. I use this setup for developing and deploying my web-apps.

This solution relies on you having an internet connection - if you dont want or dont have an internet connection at your disposal then have a look at this post: gitosis vs gitolite?

Community
  • 1
  • 1
Oliver Atkinson
  • 7,970
  • 32
  • 43