Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Orion/How Tos/Working with git

First of all, to make Git file store available, you need to add org.eclipse.orion.server.filesystem.git and all dependencies to your launch configuration. If you're missing a dependency you should probably re-import project set from webide.psf. If it didn't help, ping z4z4 on IRC (use #eclipse-orion channel).

A) These are steps to link a Git repository from a separate server:

  1. Start EclipseWeb server, go to http://localhost:8080/navigate-table.html# and log in
  2. Choose 'Link folder' [image link-folder]
  3. In the 'Link Folder' dialog enter the folder name and choose gitfs in the combo
  4. As the location use url like git://github.com/<your name>/<repository>.git, leave the Module field empty

[image folder dialog]

Orion will create a local clone of the repository and store it on the server. The user will be not aware of the local clone, so the git repository location specified by the user is the only copy of the code the user knows about. His changes will be saved in the file system on the server and then automatically added to the git index and comitted to the local repository/clone. The local clone is required by the git client if we want to push the changes back to the external git repository (eg. located on github.com). Each user will have his own copy (local clone) of the remote git repository once he created/linked a new project (separate folder on the server). The problem is that we currently don't know how to push Git changes over SSH without storing a private key on the Orion server.

B) You may also create a local bare Git repository and share it among multiple Orion users. In this case changes are pushed to the shared repository and users may share their work.

  1. To create a repository you'll need a git client like msysgit (I'm using PortableGit downloaded from here).
  2. When in the git console go to a location on your disk where you want the repository to be created (e.g. c:/temp/git-repo).
  3. Enter git init --bare
  4. Now you can follow steps from A, but for the URL enter c:/temp/git-repo

C) Another option is to clone an existing repository, but make it bare while doing so. This way you can check out a project from GitHub and share your work with others at the same time. You won't be able to push your changes back to the GitHub though (see bug 334120 and the problem described above). Anyway, here are the steps for sharing an external repo:

  1. 1, 2, 3 as in B.
  2. Enter git clone --bare git://github.com/zaza/test.git git-repo
  3. Just like in B, you can now follow steps from A and use local filesystem location as the URL (e.g. c:/temp/git-repo)

[image folder dialog2]

I guess you can init a bare repository using EGit as well, but I'm still feeling more comfortable with a CLI.

If you experience any problems when following the steps above ping z4z4, or open a new bug right away.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.