Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit » Searching a git project(Setting up a working set for searches)
Searching a git project [message #894543] Mon, 09 July 2012 10:41 Go to next message
Bruce Sherwood is currently offline Bruce Sherwood
Messages: 5
Registered: July 2012
Junior Member
I've used Eclipse for many years but egit is new to me. I can clone the relevant remote git repository, but I suspect I've gotten totally crosswise of the distinction between repository and project, and/or I don't know which buttons to press or boxes to check during the cloning process. I've started over from scratch several times and tried many combinations but I'm always left with a situation where my files show up only in the view "Git Repositories", not as a project. Attempts after the cloning to do an import give me messages that I can't import because it's already imported.

In particular, I have no way to search for strings in my files, because I can't find any way to set up a working set for searches through these files. Help?
Re: Searching a git project [message #894908 is a reply to message #894543] Tue, 10 July 2012 23:47 Go to previous messageGo to next message
Bruce Sherwood is currently offline Bruce Sherwood
Messages: 5
Registered: July 2012
Junior Member
There have been nearly a thousand views of my plea for help, but no responses, so I'll try a different set of questions. Does anyone reading this forum ever search successfully through all of their egit files for a particular string? If so, exactly what menu item do you choose from the Search menu, and exactly where do you enter the search string in the dialog box that appears? Are you in the "Git Repository Exploring Perspective" when you do the search? Is there some other perspective I should be using? Do you see your files in some perspective other than in the "Git Repository Exploring Perspective"? Thanks.

Signed,

Desperate
Re: Searching a git project [message #895008 is a reply to message #894908] Wed, 11 July 2012 07:43 Go to previous messageGo to next message
R Shapiro is currently offline R Shapiro
Messages: 386
Registered: June 2011
Senior Member
Egit is not involved with searching at all, except for the special case of searching for Git commits ("Git Search"). Any other kind of search works just like always: it will search the Eclipse projects in your workspace. It doesn't matter which perspective is visible, that has no effect on what gets searched. Usually I find it more convenient to do searches in the primary development perspective (Java, CDT, PyDev, whatever), but you don't have to.
Re: Searching a git project [message #895201 is a reply to message #895008] Wed, 11 July 2012 23:07 Go to previous messageGo to next message
Bruce Sherwood is currently offline Bruce Sherwood
Messages: 5
Registered: July 2012
Junior Member
Maybe I'm using the wrong vocabulary to describe my serious problem, so I'll try rephrasing it. I'm surely missing something simple, but it's preventing me from working. I understand that the view shouldn't affect searches but couldn't help wondering about it due to the following:

In the case of CVS I have two views: the CVS repository view and the C/C++ view. Only the latter shows up in "Project Explorer" or in the list when I want to add files to the search space.

In the case of egit I have only one view: The egit repository view, and it doesn't show up in "Project Explorer" or in the list when I want to add files to the search space, so I can only do workspace-wide searches, and such searches fail to find anything in the egit files.

Should the egit files show up in "Project Explorer"? Should they show up when I want to add files to the search space? What is your own experience?

Thanks for any help you can give. I'm really frustrated.

[Updated on: Wed, 11 July 2012 23:09]

Report message to a moderator

Re: Searching a git project [message #895420 is a reply to message #895201] Thu, 12 July 2012 15:28 Go to previous messageGo to next message
Manuel Doninger is currently offline Manuel Doninger
Messages: 119
Registered: October 2010
Senior Member
You have to import your projects from the Git repository into your workspace. To do that, right click on the repository in the Git Repositories view, and select Import Projects. Now you can import all existing projects in the Git repository into the workspace, and then searching should work.
Re: Searching a git project [message #895452 is a reply to message #895420] Fri, 13 July 2012 00:16 Go to previous messageGo to next message
Bruce Sherwood is currently offline Bruce Sherwood
Messages: 5
Registered: July 2012
Junior Member
Hurray! It works! Thank you so much. I had tried this (right-click egit repository, import projects) but encountered various error messages and abandoned the attempt. I had also thought I'd seen statements that a project was being set up for me when I cloned the repository. But thanks to your pointer, this time I fought my way through the various import options and found that "Use the New Project wizard" worked. Probably something was out of whack, because the wizard claimed that a project already existed, but thankfully it let me go ahead and overwrite. Now the project does display in the Project Explorer, and I can set up a search filter and use it. Whew.
Re: Searching a git project [message #997855 is a reply to message #894543] Tue, 08 January 2013 16:59 Go to previous messageGo to next message
Toby F is currently offline Toby F
Messages: 1
Registered: January 2013
Junior Member
I found this topic while looking for help in trying to search a git repo that I cloned, but the "Use the New Project wizard" didn't work for me, so I thought I'd post what I did.

First, here's some basics on my eclipse setup:

Eclipse IDE for JavaScript Web Developers.

Version: Indigo Service Release 2
Build id: 20120216-1857

I had set my workspace (which is what you get prompted to pick every time you open eclipse, unless you suppress the dialog) to the same root as my git local folder. That seemed right, since I planned on only working on git repos. Well, that seemed to confuse egit or eclipse (who knows) when doing an import.

I tried changing my workspace to the local directory one up from my git one and the import worked with existing project. I then found the text I was looking for throughout the git source files.

Hope that helps another desperate soul. I spent hours on this (piece of *&%$#).
Re: Searching a git project [message #998232 is a reply to message #997855] Wed, 09 January 2013 11:06 Go to previous message
Stefan Lay is currently offline Stefan Lay
Messages: 340
Registered: July 2009
Senior Member
You might check if http://wiki.eclipse.org/EGit/User_Guide#Considerations_for_Git_Repositories_to_be_used_in_Eclipse answers some of your questions.
Previous Topic:[RESOLVED] Cannot ignore files/directories
Next Topic:Mylyn Github task repository responds with connection refused
Goto Forum:
  


Current Time: Thu Jul 31 18:00:22 EDT 2014

Powered by FUDForum. Page generated in 0.04877 seconds