Skip to main content
Jump to: navigation, search

Orion/How Tos/Working with git

< Orion‎ | How Tos
Revision as of 19:06, 25 February 2011 by (Talk | contribs)

Linking to a git clone already existing on your computer

  1. First clone a git repository to any location in your local filesystem, you can do with a tool of your choice (EGit, msysgit...)
  2. Download and run Orion
  3. Create a project and link it to the location you used in Step 1. Link using file in the checkbox, not gitfs, which be soon gone.
  4. Orion will automatically detect that the project is actually a git clone (we will probably make it configurable in the future)

Linking to a git repository using git file store

Work in progress
This scenario has not been fully implemented yet.

  1. Download and run Orion
  2. Make sure org.eclipse.orion.server.filesystem.git is added your launch configuration
  3. When linking a project select gitfs, enter URL for a git repository and leave Module empty
  4. If you entered an existing location on your computer it must be a cloned repository, we won't be doing any smart detection here
    Howtogit--link folder dialog2.png
  5. For a git repository which requires authentication (e.g. starts with ssh://) to be able to clone it (and also fetch and push) you will need to wait for bug 334120 to be fixed
    Howtogit--link folder dialog.png
  6. Under the hood, a git implementation of EFS will be used to clone the repository pointed by the URL. The file store's only role is to clone the repo. Modifying the working tree can be accomplish with the File API. Adding files to the index, committing them and other git operations will be available via the Git REST API.

Using Orion Compare Viewer

Work in progress
This scenario has not been fully implemented yet.

Although still in progress , you can now use both in-line and side-by-side compare viewer from Orion.Currently you have to use the viewer HTML directly in your browser and use your file location as the hash of the html. Please also note that the compare viewer container UI will be changed later to fit better layout.

  1. Download and run Orion or pull the latest code on both server and client side.
  2. Link a folder to your git repository.
  3. Open a file in the folder by Orion Editor.
  4. Change something and save the changes.
  5. Copy the "#/file/your_project/your_file" part from the editor URL as the file location.
  6. Paste it as the hash value of the viewer HTML(/js/compare/demo/demo-inline.html and /js/compare/demo/demo.html)
  7. Below are the format and examples.
  • In-line viewer :
( e.g.  http://localhost:8080/js/compare/demo/demo-inline.html#/file/K/bundles/org.eclipse.orion.client.core/static/js/compare/demo/demo-inline.html)
  • Side-by-side viewer(as planned , this viewer will become the merge editor):
( e.g.  http://localhost:8080/js/compare/demo/demo.html#/file/K/bundles/org.eclipse.orion.client.core/static/js/compare/demo/demo-inline.html)

Using Orion Git Status Page

Work in progress
This scenario has not been fully implemented yet.

Please note that the section is currently used for developer's discussion.The UI shown below is the developer's UI mockup. The functionality is addressed in a high level.


  1. Similiar to the compare viewer , the URL format of the git status page is : http://localhost:8080/git-status.html#/file/K/bundles/org.eclipse.orion.client.core/static/js/compare/.
    Here you pass the directory path to the html.The page will show you the git status under that directory.
  2. There will be an action somewhere in the navigator to open this page so that user does not have to input the directory as the hash.
  3. On the left hand , the compare , stage and unstage button on each line will not be static in the final version. It will be replaced by show-on-the-fly button when the file item is hovered.
  4. The file items shown on the left hand side will not be shown as an standard html anchor , but clicking on it will change the compare viewer content on the right hand side. ( e.g. In the picture above , if you click on the first file item , it will change the compare viewer's content accordingly)
  5. Clicking on the compare button will open the side-by-side compare viewer in a new page.This will be a merge editor post M6.


This section was moved to Orion/Server_API/Git_API.

Bugs, comments, feedback

If you experience any problems when following the steps above ping z4z4 or SzymonB on IRC (use #eclipse-orion channel), or open a new bug right away.

Back to the top