user1098932
user1098932

Reputation: 243

How to change eGit configuration location?

I have copied a workspace used by Eclipse (Mars) to a new directory (using tar to ensure permissions/ownership is intact). Everything is working well except that eGit is pointing to the old .gitconfig files in the original workspace. For example:

/workspace1 (original workspace)
/workspace2 (new copy)

...and when using "workspace2" I go to the "Git Repositories" view, right click a repository and select "Properties", and the "Configuration" "location" is pointing to "workspace1" and changing branches will change "workspace1". The location path is something like "/Users/alex/workspaces/workspace1/project1/.git/config" and I just need to change "workspace1" to "workspace2".

All I need to do is change the path but I can't find this text in any configuration file (using grep) and this value is read-only in the dialog. Does anyone know how I can change the path? It seems much easier to do this than disconnecting/reconnecting, etc.

Many thanks in advance! Cheers,

Alex

Upvotes: 3

Views: 8304

Answers (1)

Beck Yang
Beck Yang

Reputation: 3024

The config of Git Reposititories view are stored in "/Users/alex/workspaces/workspace1/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.egit.core.prefs". However, I think it's NOT a good idea to edit it directly.

I suggest you change the path using EGit function:

  1. Select project and right click: Team -> Disconnect
  2. In Git Reposititories view, Select repository and right click: Remove Reposititory from View
  3. Select project and right click: Team -> Share Project...
  4. Select GIT as reposititory type and apply default.

Upvotes: 2

Related Questions