Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Wrong working directory?(Incorrect files appearing in Git Staging View)
Wrong working directory? [message #1700634] Mon, 06 July 2015 04:08 Go to next message
Sean Thomas is currently offline Sean ThomasFriend
Messages: 4
Registered: July 2015
Junior Member
When I open the Git Staging View it takes around 5 minutes and over 100,000 files appear.
I note that the "Location: under Preferences-Team-Git-Configuration is "C:\Users\Sean" and that the content of the Staging View appears to be the files from C:\Users\Sean. Did not check them all Smile
I am presuming that I need to edit this directory to the one the source code is actually in.
How do I do this? I do not appear to be able to edit the target directory in the dialog.
Advice appreciated.
Sean
Re: Wrong working directory? [message #1700756 is a reply to message #1700634] Mon, 06 July 2015 19:52 Go to previous messageGo to next message
Andrey Loskutov is currently offline Andrey LoskutovFriend
Messages: 89
Registered: July 2009
Member
Most likely you've managed to create git repository in your home. Please check your project you are working with - one of them is in directly at your home root directory.
Re: Wrong working directory? [message #1700795 is a reply to message #1700756] Tue, 07 July 2015 09:20 Go to previous messageGo to next message
Sean Thomas is currently offline Sean ThomasFriend
Messages: 4
Registered: July 2015
Junior Member
Hi Andrey
Thank you for your suggestion.
I tried Disconnecting my project from Git, then selecting Share. When I did this the correct directory was shown, that is the directory the project is actually in.
However the "Location": under Preferences-Team-Git-Configuration is still "C:\Users\Sean" - which I agree is the wrong directory. I don't understand why Git is looking somewhere other than in the directory configured with the project. But then I am very new to Git.
Kind regards
Sean
Re: Wrong working directory? [message #1700797 is a reply to message #1700795] Tue, 07 July 2015 09:59 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Preferences-Team-Git-Configuration / User Settings refers to your ~/.gitconfig configuration file which you can use to configure
git settings which shall be used for all the git repositories you have. Each git repository has another configuration located
at .git/config which can enhance / override configurations you have set in ~/.gitconfig
Re: Wrong working directory? [message #1700898 is a reply to message #1700634] Wed, 08 July 2015 01:38 Go to previous messageGo to next message
Sean Thomas is currently offline Sean ThomasFriend
Messages: 4
Registered: July 2015
Junior Member
Hi Matthias
Thank you. So how do I change the settings (specifically the directory) for Preferences-Team-Git-Configuration / User Settings?
I presume that I need to point this to a directory other than my Windows profile home directory.
Kind regards
Sean
Re: Wrong working directory? [message #1701340 is a reply to message #1700634] Sun, 12 July 2015 06:45 Go to previous message
Sean Thomas is currently offline Sean ThomasFriend
Messages: 4
Registered: July 2015
Junior Member
Woo hoo, I have finally got this sorted.
The solution was to :
Open the "Git Repositories" view.
Use the drop down menu to "Create a Repository"
Right click on the old repository (in the Windows profile home directory by mistake) and "Delete Repository"
Go to my existing projects and point them to the new repository.

After this everything worked like a charm. I was attempting to make these changes via the "Preferences" option, which although it really looked like the right place, turned out to be the wrong place.
Thank you very much to those who provided me tips along the way.
Kind regards
Sean
Previous Topic:A orion plugin to enable a private git repository
Next Topic:How to run source code of EGit ?
Goto Forum:
  


Current Time: Thu Apr 25 02:30:16 GMT 2024

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

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

Back to the top