Orion/How Tos/Working with git
Linking to a git clone already existing on your computer
- First clone a git repository to any location in your local filesystem, you can do with a tool of your choice (EGit, msysgit...)
- Download and run Orion
- 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.
- 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
- Download and run Orion
- Make sure
org.eclipse.orion.server.filesystem.gitis added your launch configuration
- When linking a project select
gitfs, enter URL for a git repository and leave Module empty
- If you entered an existing location on your computer it must be a cloned repository, we won't be doing any smart detection here
- 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
- 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
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.
- Download and run Orion or pull the latest code on both server and client side.
- Link a folder to your git repository.
- Open a file in the folder by Orion Editor.
- Change something and save the changes.
- Copy the "#/file/your_project/your_file" part from the editor URL as the file location.
- Paste it as the hash value of the viewer HTML(/js/compare/demo/demo-inline.html and /js/compare/demo/demo.html)
- Below are the format and examples.
- In-line viewer :
http://Your_server:8080/js/compare/demo/demo-inline.html#/file/your_project/your_file ( 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):
http://Your_server:8080/js/compare/demo/demo.html#/file/your_project/your_file ( 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)
Git REST API
This section was moved to Orion/Server_API/Git_API.