Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » transitioning from svn to git
transitioning from svn to git [message #883548] Fri, 08 June 2012 19:07 Go to next message
Randy Heiland is currently offline Randy HeilandFriend
Messages: 7
Registered: February 2010
Junior Member
Hello, I'm trying to transition from using svn to git in Eclipse. A couple of questions:

- when I would make changes to a file in my (checked-out code) workspace from a svn repo, it would highlight that file with a ">", indicating that it had been modified. Modifying a file in my git clone doesn't seem to highlight it as having been modified. Am I missing something?

- similarly, from a file in a checked-out svn repo, I could right-click the file and, for example, "Compare With -> Latest from Repo". Is there anything similar in Egit?

I'm using:
Eclipse EGit - Source 1.3.0.201202151440-r
Re: transitioning from svn to git [message #883736 is a reply to message #883548] Sat, 09 June 2012 08:18 Go to previous messageGo to next message
Fran Schmidt is currently offline Fran SchmidtFriend
Messages: 3
Registered: June 2012
Junior Member
Randy,

Quote:
I'm trying to transition from using svn to git in Eclipse

Good choice! Wink

Quote:
it would highlight that file with a ">", indicating that it had been modified. Modifying a file in my git clone doesn't seem to highlight it as having been modified. Am I missing something?

It should do the same thing, highlighting with a ">" in your project explorer in Eclipse. What perspective are you using?

Quote:
I could right-click the file and, for example, "Compare With -> Latest from Repo". Is there anything similar in Egit?

You can right click 'Compare with'->'Previous revision'. I am not too familiar with svn, but I imagine this option would give a similar result.
Re: transitioning from svn to git [message #884002 is a reply to message #883736] Sat, 09 June 2012 21:50 Go to previous messageGo to next message
Randy Heiland is currently offline Randy HeilandFriend
Messages: 7
Registered: February 2010
Junior Member
I'm definitely not using git/Egit within Eclipse correctly then. I've cloned a git repo from the Git Repo Perspective:
"Clone a git repo and add the clone to this view"

but then, when I right-click that cloned repo in my persp, I don't see anything resembling a "Check out" like I do for a svn repo in that persp. What am I not understanding? I've tried to follow some tutorials, but still don't get it.
Re: transitioning from svn to git [message #884128 is a reply to message #884002] Sun, 10 June 2012 07:11 Go to previous messageGo to next message
Fran Schmidt is currently offline Fran SchmidtFriend
Messages: 3
Registered: June 2012
Junior Member
Yes, it does sound as if you don't have egit properly installed.
You say you've cloned the egit repo, but did you actually installegit , too?
If not use the Egit download page to install in your Eclipse. ("Help"->"Install new Software")


Re: transitioning from svn to git [message #884129 is a reply to message #883548] Sun, 10 June 2012 07:13 Go to previous messageGo to next message
Fran Schmidt is currently offline Fran SchmidtFriend
Messages: 3
Registered: June 2012
Junior Member
Yes, it does sound as if you don't have egit properly installed.
You say you've cloned the egit repo, but did you actually installegit , too?
If not use the Egit download page to install in your Eclipse. ("Help"->"Install new Software")
Re: transitioning from svn to git [message #884140 is a reply to message #884129] Sun, 10 June 2012 07:55 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
Most operations are only available if you right-click on a project and go to the Team menu or if you click on a commit in the history view. You should also note that your project is correctly connected as Git project (e.g., if you go to the Team menu, you see the EGit operations and not only menu entries like Apply patch or Share project).
Re: transitioning from svn to git [message #884209 is a reply to message #884129] Sun, 10 June 2012 12:31 Go to previous messageGo to next message
Randy Heiland is currently offline Randy HeilandFriend
Messages: 7
Registered: February 2010
Junior Member
No, I didn't say I'd cloned the egit repo, but another git repo that I'm working with. Yes, I've egit installed - when I look at my "Installation details", it shows:
Eclipse EGit 1.3.0.201202151440-r org.eclipse.egit.feature.group Eclipse EGit

I was curious how others setup their Eclipse Prefs -> Team -> Git: Default repo folder

I've got mine set to be ~/git, rather than my Eclipse workspace dir.
Re: transitioning from svn to git [message #884749 is a reply to message #884002] Mon, 11 June 2012 18:33 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Quote:
when I right-click that cloned repo in my persp, I don't see anything resembling a "Check out" like I do for a svn repo in that persp ... What am I not understanding?


What you're not understanding is probably some very important differences between SVN and Git. In particular you don't need to do a checkout in the SVN sense -- a working directory is already there, attached to your clone. If you don't see the corresponding project(s) in your workspace you just need to import them. You can do this from the entry in the Git Repository perspective (don't use the Import item from the File menu, this doesn't always work).

There is a checkout operation in Git (and egit), but it's more like svn switch than svn checkout. You use Git checkout to change your working directory to a different branch, tag or reference.

To see more egit operations in your main development view (java, c++, python, whatever), customize the corresponding perspective and enable the Git command group. This will add the most commonly used operations to the toolbar and also enable a Git item in the menubar. There are other egit operations scattered around various places (right-click menus, new views etc).

You might want to consider upgrading to the egit nightly builds of 2.0, as it it has quite a few advantages over 1.3.

Re: transitioning from svn to git [message #884768 is a reply to message #884749] Mon, 11 June 2012 19:34 Go to previous messageGo to next message
Randy Heiland is currently offline Randy HeilandFriend
Messages: 7
Registered: February 2010
Junior Member
Yes, I'm familiar with the basic differences between SVN and Git. My confusion lies in the proper way to work with a cloned git repo inside Eclipse/Egit. The way that I currently do it, as I've tried to explain in previous posts is:

1) from the Git Repo perspective, select the icon to "clone a git repo and addd the clone to this view". This does indeed do the clone and I can see it/access its files from within the Git Repo perspective. When I right-click on the cloned repo, I see some git cmds, but don't see any "Team" item or any item that sounds like it would let me compare/diff files (see attached screenshot)

2) my original question included - if I then edit one of these files and save it, why don't I see a ">" marker on the file, telling me that it's been modified?

As I think I've also mentioned, my git repos are in a separate dir (~/git) than my other (svn, etc) Eclipse projects (~/Documents/workspace).

Regarding your suggestion to "customize corresp persp and enable the Git...", I right-click on a Persp in the top tab of the gui and click on "Customize", but I seem to get an error "Git cannot be made visible because all its children are in unavailable command groups" (see attached screenshot)


Regarding your suggestion to update to Egit nightly (2.0), from here:
(arg, when I try to include the full http link, I get:
You cannot use links until you have posted more than 25 messages.
-- SERIOUSLY?!)
www.eclipse.org/egit/download/
I click on the download.eclipse.org/egit/updates-nightly
and get a 404. Maybe it's a temporary problem.

thanks, Randy

Re: transitioning from svn to git [message #884783 is a reply to message #884768] Mon, 11 June 2012 20:22 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel DoningerFriend
Messages: 119
Registered: October 2010
Senior Member
You have to import the projects from the git repository into your workspace to really work with your files. To do that, you right-click on the repository in the Git repositories view and select "Import projects". If you did that, you'll see your projects in the Project explorer, and then you also should see markers, when you change a file. (Also note: The projects are not physically imported in the Eclipse workspace directory, only linked into your Eclipse workspace).

The update site http://download.eclipse.org/egit/updates-nightly is only accessible via Eclipse Install manager. The 404 in the browser is correct.
Re: transitioning from svn to git [message #884865 is a reply to message #884783] Tue, 12 June 2012 01:17 Go to previous messageGo to next message
Randy Heiland is currently offline Randy HeilandFriend
Messages: 7
Registered: February 2010
Junior Member
THANK you for clearly explaining the proper way to get my git repo into an Eclipse workspace (right-click on git repo in Git persp and "Import Projects"). That helped tremendously. I've got a lot to learn, but at least I'm started down the right path. One difference that I noticed was that when I would right-click on a file in a project that was checked out from svn, and do 'Compare with -> Latest from repo', it would simply tell me "There are no diffs" if that was the case. With a file from a git repo, it doesn't tell me that; rather, it brings them up side-by-side, even if there are no diffs.


About your suggestion for updating to egit 2.0 - are there release notes about it?

When I tried to install download.eclipse.org/egit/updates-nightly

I got the following:

Your original request has been modified.
"Eclipse EGit" is already installed, so an update will be performed instead.
"Eclipse EGit - Source" is already installed, so an update will be performed instead.
"EGit Mylyn" is already installed, so an update will be performed instead.
"EGit Project Set Support" is already installed, so an update will be performed instead.
"Eclipse JGit" is already installed, so an update will be performed instead.
"Eclipse JGit - Source" is already installed, so an update will be performed instead.
Cannot complete the install because one or more required items could not be found.
Software being installed: EGit Import Support 2.0.0.201206111613 (org.eclipse.egit.import.feature.group 2.0.0.201206111613)
Missing requirement: EGit Import Support 2.0.0.201206111613 (org.eclipse.egit.import.feature.group 2.0.0.201206111613) requires 'org.eclipse.team.core 3.6.100' but it could not be found


--> so I installed the eclipse.org/eclipse/platform-core/updates

and then tried to re-install the egit nightly and got:

Your original request has been modified.
"EGit Project Set Support" is already installed, so an update will be performed instead.
"Eclipse EGit - Source" is already installed, so an update will be performed instead.
"Eclipse EGit" is already installed, so an update will be performed instead.
"EGit Mylyn" is already installed, so an update will be performed instead.
"Eclipse JGit - Source" is already installed, so an update will be performed instead.
"Eclipse JGit" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
Software being installed: EGit Project Set Support 2.0.0.201206111613 (org.eclipse.egit.psf.feature.group 2.0.0.201206111613)
Software currently installed: Eclipse EGit Mylyn GitHub Feature 1.3.0.201202151440-r (org.eclipse.mylyn.github.feature.feature.group 1.3.0.201202151440-r)
Only one of the following can be installed at once:
Git Team Provider Core 1.1.0.201109151100-r (org.eclipse.egit.core 1.1.0.201109151100-r)
Git Team Provider Core 2.0.0.201206111613 (org.eclipse.egit.core 2.0.0.201206111613)
Git Team Provider Core 1.3.0.201202151440-r (org.eclipse.egit.core 1.3.0.201202151440-r)
Git Team Provider Core 1.0.0.201106090707-r (org.eclipse.egit.core 1.0.0.201106090707-r)
Cannot satisfy dependency:
From: EGit Project Set Support 2.0.0.201206111613 (org.eclipse.egit.psf.feature.group 2.0.0.201206111613)
To: org.eclipse.egit.core [2.0.0,2.1.0)
Cannot satisfy dependency:
From: Mylyn GitHub Connector Core 1.3.0.201202151440-r (org.eclipse.mylyn.github.core 1.3.0.201202151440-r)
To: package org.eclipse.egit.core [1.3.0,1.4.0)
Cannot satisfy dependency:
From: Eclipse EGit Mylyn GitHub Feature 1.3.0.201202151440-r (org.eclipse.mylyn.github.feature.feature.group 1.3.0.201202151440-r)
To: org.eclipse.mylyn.github.core [1.3.0.201202151440-r]


and also got the error:
Unknown Host: cbes.javaforge.com/update/site.xml
cbes.javaforge.com


Suggestions? Do I need to manually remove earlier versions of egit and, if so, how?

thanks, Randy
Re: transitioning from svn to git [message #885220 is a reply to message #884865] Tue, 12 June 2012 16:20 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
You should un-install at least EGit Project Set Support and the GitHub stuff before upgrading. You might want un-install the two 'Source' plugins as well, you don't need those anyway.

re: Customize, use Window -> Customize Perspective, then enable the Git command-group,
Re: transitioning from svn to git [message #885223 is a reply to message #884865] Tue, 12 June 2012 16:25 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
You should un-install at least EGit Project Set Support and the GitHub stuff before upgrading. You might want un-install the two 'Source' plugins as well, you don't need those anyway.

re: Customize, use Window -> Customize Perspective, then enable the Git command-group,
Re: transitioning from svn to git [message #885225 is a reply to message #884865] Tue, 12 June 2012 16:27 Go to previous messageGo to next message
R Shapiro is currently offline R ShapiroFriend
Messages: 386
Registered: June 2011
Senior Member
Quote:
and also got the error:
Unknown Host: cbes.javaforge.com/update/site.xml
cbes.javaforge.com


The only plugin I've seen from this site is the one for Mercurial/HG. Egit doesn't use it.

Re: transitioning from svn to git [message #892372 is a reply to message #885225] Wed, 27 June 2012 22:49 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
It looks like you installed the egit fork maintained here http://www.javaforge.com/project/EGIT.
Either ask the maintainers of that fork to fix your problem or uninstall it before trying to installing
the real egit.
Previous Topic:download site for stable egit/jgit 2.0 ?
Next Topic:Merge using Egit
Goto Forum:
  


Current Time: Fri Mar 29 08:01:20 GMT 2024

Powered by FUDForum. Page generated in 0.05111 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top