2

I have this general project folder of mine which includes a variety of stuff: text, images, binary files etc. I want and need to keep this project in version control under git, so if I mess up something I can revert to a previous version of all files.

One thing inside this project is an Eclipse IDE Java workspace with all it's contents.

My questions is, how can I share this general project including the Eclipse workspace between my Mac OS X and WinXP computers so that pushes and pulls would go as smoothly as possible?

As it is now, whenever I push from e.g. OSX to remote repository and pull from there to my XP machine, the classpaths and stuff goes all wrong again and I need to put down quite an effort to sort things up.

Jonas Granvik
  • 935
  • 7
  • 13
  • 1
    It is a bad idea to share workspaces between different versions of Eclipse. As of 2016 write Maven modules instead as this allows easy regeneration of a project on a new machine while keeping the metadata outside of your shared file tree. – Thorbjørn Ravn Andersen Mar 20 '16 at 20:09

2 Answers2

1

I'd set up the machines to ignore any OS specific information

this can be acomplished with putting a file named .gitignore in the root of the working directory of the repository.

in .gitignore

/path/not/to/share/*
Fire Crow
  • 7,499
  • 4
  • 36
  • 35
  • This worked out well eventually even though there was pretty much to ignore that did not work on both platforms. Checking out to a new platform requires some additional work now, but that shouldn't happen all too often. – Jonas Granvik Dec 16 '09 at 11:21
0

Not sure about "the stuff" (may be exporting preferences and re-importing them after the git pull could help.

Regarding the paths, I would definitively recommend configuring your project with linked directories and a path variable for linked resources: that variable is set per eclipse installation and would remain valid for a given machine.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250