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.
Difference between revisions of "Orion/How Tos/Working with git"
m |
m (→Linking to a git repository using git file store) |
||
Line 11: | Line 11: | ||
# If you entered an existing location on your computer it must be a cloned repository, we won't be doing any smart detection here [[Image:Howtogit--link folder dialog2.png]] | # If you entered an existing location on your computer it must be a cloned repository, we won't be doing any smart detection here [[Image:Howtogit--link folder dialog2.png]] | ||
# 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 [https://bugs.eclipse.org/bugs/show_bug.cgi?id=334120 bug 334120] to be fixed [[Image:Howtogit--link folder dialog.png]] | # 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 [https://bugs.eclipse.org/bugs/show_bug.cgi?id=334120 bug 334120] to be fixed [[Image:Howtogit--link folder dialog.png]] | ||
+ | # 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 index, committing them and other git operation will be done with the [[#git REST API]]. | ||
= git REST API = | = git REST API = |
Revision as of 07:02, 16 February 2011
Contents
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.
- 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.git
is 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 index, committing them and other git operation will be done with the #git REST API.
git REST API
Getting status for a git project
- Overview
- To retrieve the working tree status of a project, send a GET request to the git status location.
- HTTP Method
- GET
- Example Request
GET /git/status/file/MyProj/
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Progress in being tracked on bug 337212.
This section will be moved to Orion/Server_API once the API get stable.
Getting a diff
- Overview
- To retrieve changes changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location.
- HTTP Method
- GET
- Example Request
GET /git/diff/file/MyProj/
- Example Response
HTTP/1.1 200 OK
Content-Type: text/plain
Content-Length: 22
TBD
- Detailed Explanation
- TBD.
Progress in being tracked on bug 337212.
This section will be moved to Orion/Server_API once the API get stable.
Other operations
TBD, see bug 336116
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.