Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse 'Git Repository' perspective vs. 'Team Synchronizing'

Tags:

eclipse

egit

I'm trying to rationalize two perspectives which seem to be related (or at least provide very similar functionality): The 'Git Repository' perspective (which I got after adding EGit), and the 'Team Synchronizing' perspective (which I think was part of the EE distribution).

As far as I can tell, I was able to get the Git Repository working (with GitHub), or at least most of the features: The 'Git Staging' Window is working fine, I'm able to commit by dragging files from 'Unstaged changes' to 'Staged changes' and then clicking the Commit icon. Then I'm able to push my changes from the 'Git Repositories' window, by right clicking on the workspace->Remotes->origin->url, and select Push from menu (is that the 'correct' procedure?).

With the 'Team Synchronizing' perspective, I'm no luck to even set it up. Once selecting the 'Synchronize...' frmo the menu, the Git, then I see a table (what is it?). I'm trying various values for the Destination (otherwise, unable to hit the Finish button), but no matter what I do, it tells me 'no changes' for all my projects.

There are also many context-menu item when right clicking on a project, and selecting 'Team'. What are these?

like image 421
Uri Avatar asked Apr 04 '12 09:04

Uri


1 Answers

In CVS the Team Synchronize is about the only sane way of managing your incoming and outgoing changes. You can update / merge incoming changes and commit outgoing changes from this one view. Since every commit is discrete and it is non-atomic, the view is fine for this workflow.

In EGit however you already have explicit actions for adding, committing, pushing, pulling and merging. So the team synchronize is largely outside the normal workflow. It behaves much like a glorified synching from a patch - you pick which branch(s) you wish to compare your working directory and it shows you the differences. You can then apply those changes en masse or individually but it's not going to pick up the context, i.e. it's not going to create merge points or whatnot.

So you should train yourself not to use except for exceptional reasons. For example, maybe you have two branches A & B. Somebody committed a change to B and you need only a small part of it, so you could use Team Sync to show the diffs and only apply the ones you need. Or maybe you just want to squash up all the changes on branch B and call them a single commit in A. Then you might use Team Sync rather than screwing around with a rebase when you're going to toss B anyway or its a remote branch.

like image 192
locka Avatar answered Sep 20 '22 19:09

locka