Difference between revisions of "Git"

From BaseX Documentation
Jump to navigation Jump to search
(→‎Using Git & Eclipse: How to use EGit and a native SSH client.)
Line 73: Line 73:
 
</div>
 
</div>
 
===EGit & SSH===
 
===EGit & SSH===
EGit uses the [http://www.jcraft.com/jsch JSch] library which is, however, [https://bugs.eclipse.org/bugs/show_bug.cgi?id=326526 reported] to have problems with RSA SSH keys in linux and possibly other platforms. A solution would be to use the variable GIT_SSH and assign it a path to the native SSH executable. According to [http://egit.eclipse.org/r/#change,2037 this] change in EGit, the plugin will try to use a native SSH implementation instead of JSch (this may, however, not always work ;) ).
+
EGit uses the [http://www.jcraft.com/jsch JSch] library which is, however, [https://bugs.eclipse.org/bugs/show_bug.cgi?id=326526 reported] to have problems with RSA SSH keys in linux and possibly other platforms. A solution would be to use the variable GIT_SSH and assign it a path to the native SSH executable. According to [http://egit.eclipse.org/r/#change,2037 this] change in EGit, the plugin will try to use a native SSH implementation instead of JSch (this, however, may not always work either :( ).
  
 
==Need help using git?==
 
==Need help using git?==

Revision as of 18:33, 20 February 2011

Using Git to contribute to BaseX

Our team uses git and GitHub to manage the source code.

All team members have read+write access to the repository, external contributors are invited to fork the project.

Git makes it easy to retain a full copy of the repository for yourself. To get started and running, simply fork BaseX. If forking sounds unfamiliar to you, we suggest to look up some of the documentation listed at the end of this page.

You can then build BaseX with Maven. Using Eclipse is optional.

Using Git & Eclipse

  1. (Optional) Head over to https://github.com/BaseXdb and create an account
  2. Fork BaseX, so you have a version on your own
  3. Make yourself familiar with git (see the end of this page)
  4. Install egit (Eclipse: HelpMarketplace → Search for egit or get it from http://www.eclipse.org/egit/)
  5. Open Eclipse

Setup

Git01.png
In the Package Explorer to the left use right-click and choose Import...
Git02.png
Select "Projects from Git" and click Next >

Clone

Git03.png
Click "Clone..." to create a local copy of the remote repository. This copy will include the full project history
Git04.png
Copy & Paste the github URI in the Location field. If you want to use SSH make sure you provided GitHub with your public key to allow write-access. If in doubt use the HTTPS URI and authenticate yourself with your GitHub credentials.
Git05.png
Select the master branch (or arbitrary branches you like)
Git06.png
Now choose a location where the local repository is stored: Create <workspace>/repos/BaseX

and click "Finish".

Create the project

Git07.png
Select our newly cloned repository and click Next
Git08.png
Select "Import Existing Projects" and depending on your Eclipse version enable automatic sharing. More recent versions will not offer this feature as sharing is enabled by default.

Click next to select the Project to import

Git09.png
Check "basex" to checkout and click finish
Git10.png
You are now ready to contribute.

EGit & SSH

EGit uses the JSch library which is, however, reported to have problems with RSA SSH keys in linux and possibly other platforms. A solution would be to use the variable GIT_SSH and assign it a path to the native SSH executable. According to this change in EGit, the plugin will try to use a native SSH implementation instead of JSch (this, however, may not always work either :( ).

Need help using git?

Installing

For information on how to install git on various platforms please refer to: GitHub: git Installation Guide

Documentation