Difference between revisions of "Git"

From BaseX Documentation
Jump to navigation Jump to search
Line 2: Line 2:
  
 
The team uses git and [https://github.com/BaseXdb/BaseX GitHub] to manage the source code.
 
The team uses git and [https://github.com/BaseXdb/BaseX 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.
  
 
==Using Git & Eclipse ==
 
==Using Git & Eclipse ==
Line 9: Line 14:
 
# Install egit (Eclipse: Help > Marketplace > Search for ''egit'' '''or''' get it from [http://www.eclipse.org/egit/ here])
 
# Install egit (Eclipse: Help > Marketplace > Search for ''egit'' '''or''' get it from [http://www.eclipse.org/egit/ here])
 
# Open Eclipse
 
# Open Eclipse
 +
  
 
<div class="subcolumns">
 
<div class="subcolumns">
Line 20: Line 26:
 
<div class="subcolumns">
 
<div class="subcolumns">
 
<div class="c50l">
 
<div class="c50l">
[[File:Git03.png|300px|left]] In the '''Package Explorer''' to the left use right-click and choose Import...
+
[[File:Git03.png|300px|left]] Click "Clone..." to create a local copy of the remote repository. This copy will include the full project history
 
</div>
 
</div>
 
<div class="c50r">
 
<div class="c50r">
[[File:Git04.png|300px|left]] Select "Projects from Git" and click Next &gt;
+
[[File:Git04.png|300px|left]] 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.
 
</div>
 
</div>
 
</div>
 
</div>
Line 29: Line 35:
 
<div class="subcolumns">
 
<div class="subcolumns">
 
<div class="c50l">
 
<div class="c50l">
[[File:Git05.png|300px|left]] In the '''Package Explorer''' to the left use right-click and choose Import...
+
[[File:Git05.png|300px|left]] Select the master branch (or arbitrary branches you like)
</div>
+
 +
</div>
 
<div class="c50r">
 
<div class="c50r">
[[File:Git06.png|300px|left]] Select "Projects from Git" and click Next &gt;
+
[[File:Git06.png|300px|left]] Now choose a location where the local repository is stored: Pick &lt;workspace&gt;/repos/BaseX
 +
and click "Finish"
 +
 
</div>
 
</div>
 
</div>
 
</div>
Line 38: Line 47:
 
<div class="subcolumns">
 
<div class="subcolumns">
 
<div class="c50l">
 
<div class="c50l">
[[File:Git07.png|300px|left]] In the '''Package Explorer''' to the left use right-click and choose Import...
+
[[File:Git07.png|300px|left]] Select our newly cloned repository and click Next
 
</div>
 
</div>
 
<div class="c50r">
 
<div class="c50r">
[[File:Git08.png|300px|left]] Select "Projects from Git" and click Next &gt;
+
[[File:Git08.png|300px|left]] 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
 
</div>
 
</div>
 
</div>
 
</div>
Line 47: Line 58:
 
<div class="subcolumns">
 
<div class="subcolumns">
 
<div class="c50l">
 
<div class="c50l">
[[File:Git09.png|300px|left]] In the '''Package Explorer''' to the left use right-click and choose Import...
+
[[File:Git09.png|300px|left]] Check "basex" and click finish
 
</div>
 
</div>
 
<div class="c50r">
 
<div class="c50r">
[[File:Git10.png|300px|left]] Select "Projects from Git" and click Next &gt;
+
[[File:Git10.png|300px|left]] You are now ready to contribute.
 
</div>
 
</div>
 
</div>
 
</div>

Revision as of 17:50, 17 February 2011

Using Git to contribute to BaseX

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

Using Git & Eclipse

  1. (Optional) Head over to GitHub and create an account
  2. Make yourself familiar with git, there are several tutorials around the web
  3. Install egit (Eclipse: Help > Marketplace > Search for egit or get it from here)
  4. Open Eclipse


Git01.png
In the Package Explorer to the left use right-click and choose Import...
Git02.png
Select "Projects from Git" and click Next >
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: Pick <workspace>/repos/BaseX

and click "Finish"

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" and click finish
Git10.png
You are now ready to contribute.