With git your working directory and your repository are the same thing (well the repository is the .git directory in the root folder of the project).

Here is my workflow, I'll try and get some screenshots and/or videos up next week as well

1. Switch to the git repository list, clone the uPortal repository (or
   your fork of it)
2. Expand the entry for the local repository, right click on the
   "Working directory" and select "Import projects..." continue with
   importing as a general project, don't relocate the source.
3. Once you have the general project imported right click on it and go
   to "Configure > Convert to Maven project"
4. Right click on the project and go to "Import ..." select "Maven >
   Existing Maven Projects" and select the uPortal modules you'd like
   to materialize as projects (in general uportal-war and
   uportal-search-api are the only two that are needed)


As for reverting changes, what do you need to revert? I believe "git reset --hard" will remove all local modifications to the currently checked out branch. There is also a "Reset ..." option under the Team menu, that brings up a dialog and at the bottom "Hard" is one of the options you can select.

-Eric

On 10/22/11 10:37 AM, Nicholas Blair wrote:
Can anyone point in the direction of some useful Git-Eclipse integration instructions, particularly those helpful for the uPortal project structure?

I've tried following EGit's User Guide, but what I've been able to come up with is awkward and pretty unusable:

http://wiki.eclipse.org/EGit/User_Guide

What I've done so far:

- Forked uPortal to my account on github: https://github.com/nblair/uPortal - Created a local clone of the repository, git clone [email protected]:nblair/uPortal.git
- Created a branch to work on git checkout -b UP-3226

Now in Eclipse, I've got EGit installed. Under the Git Repositories perspective, I added my local clone. The most intuitive path I started with was navigate under Branches/Local/UP-3226. It seemed to me that I could right click on that branch and check it out as a project, but that option doesn't exist. If you right click on the Working directory, Import project shows up as an option. It doesn't appear that .project files are available in the source tree, so the only option that works is to import as a General project.

I did just that, thinking I could use Import->Existing Maven Projects and they'd all show up as I had them previously. That doesn't work however.

The only way I could get rolling was to import just one sub-project (e.g. uportal-war) at a time. That works, but the project doesn't show up as attached to a VCS, so right clicking on any entry under that project doesn't offer any Team actions. I have to go up to the original general project to see Team actions.

Can anyone share their workspace setups? I'm thinking I'm just missing the obvious, since so far my experience using Git with Eclipse has been pretty poor.

Bonus question: What is the equivalent for "svn revert"? There is nothing under the Team actions that resembles it. I'm not even sure how to do it from the command line.
--

You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/uportal-dev

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to