Skip to content

Instantly share code, notes, and snippets.

@stepheneb stepheneb/gist:46488
Created Jan 13, 2009

Embed
What would you like to do?
Working with git from Eclipse
(using my fork of ardor3dv1 as an example.
Add the eclipse git plugin update site: http://www.jgit.org/update-site/
I'm using the Tentative Build sub-update site -- it has the latest builds.
Gou need to use git from the command line to initially clone the project:
git clone git://github.com/stepheneb/ardor3dv1.git
Once you've done that (and added the egit plugin) you can add ardor3dv1 to a workspace or make a new one and import the projects in that folder (you don't need the project_sets project).
Then select all 9 of the new ardor3dv1 projects in Eclipse and open Team::Sharing and select Git as the repo type have it search for existing Git repos -- you need to iterate through this dialog for each project. All 9 of the ardor3dv1 projects are now under one git repo.
The Project Explorer window should now look something like this:
http://img.skitch.com/20090113-tgxt79i8cxydauhiye7ws1xwhh.png
Select one of the ardor3dv1 projects and choose Team::Branch and click "New Branch" and select the remote branch origin/macosx:
http://img.skitch.com/20090113-g5i23yd7wr69wf22cwe6fr3w82.png
Finish this operation by checking out the new local branch "macosx" into your working dir:
http://img.skitch.com/20090113-dqxyj4a72f83kpsjmxjcerb4pm.png
All 9 projects managed by this one git repo should now be on the macosx branch:
http://img.skitch.com/20090113-mr5igf24txmi8hxcs1jf6k22tx.png
If you want to experiment create your own branch by following the last two steps again.
If you make changes in a file that git is tracking you will need to commit it locally before git will allow you to switch to another branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.