Is it better to keep Git repository inside or outside of Eclipse workspace?

房东的猫 提交于 2019-11-27 11:47:00

The implications of both solutions are listed directly in the user guide that you linked. I can tell you that the part

This can result in performance issues

is unfortunately very true. So if you have a git directory with a huge number of files inside your workspace, many git operations will start with a "counting objects..." dialog that blocks your IDE because it scans all files in the workspace. For my current 20000 files this means waiting 10 to 20 seconds for every commit, every switch, ...

In spare time activities, where I can fortunately use the other alternative (having the git working directory outside the workspace) everything feels much snappier and it is fun to merge and switch.

So if you go for large projects, consider the git directory outside the workspace as first choice.

Michel

I am doing the same migration as the original poster and have found another thread where the same doubts are expressed on the Egit recommendation: Should I store git repository in Home or Eclipse Workspace?

@JamesG So this is your layout?

~/projectA/workspace/.metadata
~/projectA/workspace/subproj1/.project
~/projectA/workspace/subproj2/.project
~/projectA/subproj1/.git
~/projectA/subproj1/file1
~/projectA/subproj2/.git
~/projectA/subproj1/file2
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!