Difference between revisions of "Orion/How Tos/Working with git"

From Eclipsepedia

< Orion‎ | How Tos
Jump to: navigation, search
m (Git REST API)
(Git REST API)
Line 15: Line 15:
 
= Git REST API =
 
= Git REST API =
  
This section will be moved to [[Orion/Server_API]] once the API get stable.
+
This section was moved to [[Orion/Server_API/Git_API]].
 
+
== Getting status for a git project ==
+
 
+
{{Orion/ServerAPI
+
| method = GET
+
| overview = To retrieve the working tree status of a project, send a GET request to the git status location.
+
| reqhead = /git/status/file/MyProj/
+
| resphead = 200 OK
+
  Content-Type: text/plain
+
  Content-Length: 22
+
| respbody = 
+
  TBD
+
| explain = TBD.
+
}}
+
 
+
Progress in being tracked on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=337212 bug 337212].
+
 
+
== Getting a diff ==
+
 
+
{{Orion/ServerAPI
+
| method = GET
+
| overview = To retrieve changes changes between selected commits, commit and working tree, and so on. Send a GET request to the git diff location.
+
| reqhead = /git/diff/file/MyProj/
+
| resphead = 200 OK
+
  Content-Type: text/plain
+
  Content-Length: 22
+
| respbody = 
+
  TBD
+
| explain = TBD.
+
}}
+
 
+
Progress in being tracked on [https://bugs.eclipse.org/bugs/show_bug.cgi?id=337212 bug 337212].
+
 
+
== Other operations ==
+
TBD, see [https://bugs.eclipse.org/bugs/show_bug.cgi?id=336116 bug 336116]
+
  
 
= Bugs, comments, feedback =
 
= Bugs, comments, feedback =

Revision as of 20:10, 17 February 2011

Contents

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.
  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

  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.

Git REST API

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.