如何从Eclipse本地存储库中分离出Eclipse工作区? [英] How to isolate Eclipse workspace from git local repository?

查看:172
本文介绍了如何从Eclipse本地存储库中分离出Eclipse工作区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Juno上安装了EGit,并在Eclipse的工作区中创建了一个Java项目。然后我将这个项目分享给Git。然后,当我检查项目的属性时,我发现该项目已从其原始工作区移至Git本地存储库。在Eclipse编辑器中进行一些更改时,更改是在本地存储库中进行的,无需提交。



如何将Eclipse工作区与git本地存储库隔离? b
$ b

(那么,我的Eclipse工作区是〜/ Documents / workspace,我的git本地存储库是〜/ git / myrepository1。)

解决方案

工作空间仍处于编辑之外的原始位置。这是已被移入git控制目录的项目。通常情况下,项目是在Eclipse工作区文件夹中创建的,但您可以覆盖该默认值。



如果您确实想要隔离git中的更改,则必须打破git对该项目,但您仍可能需要将项目内容移回工作区。不幸的是,进一步改变回git的过程变得非常混乱。



我首先发现git控制我的eclipse项目让人感到不安,但是过了一段时间它确实开始有意义,并且是一个非常强大的版本控制功能。


I installed EGit on Juno and created a Java project in workspace of Eclipse. Then I shared that project to Git. Then when I check the project's properties, I found that the project had been moved from its original workspace into Git local repository. When I make some changes in Eclipse editor, the changes are made on the local repository without commit.

How to isolate Eclipse workspace from git local repository?

(Well, my Eclipse workspace is ~/Documents/workspace, my git local repository is ~/git/myrepository1. )

解决方案

The workspace is still in its original location outside of edit. It's the projects that have been moved into the git-controlled directories. Normally projects are created in the Eclipse workspace folder but you can override that default.

If you really want to isolate changes from git, you'll have to break git's control of the project, but you may still have to move the project contents back into your workspace. Unfortunately, the process of getting further changes back into git gets really messy.

I've found it unnerving at first the way git controls my eclipse projects, but after a while it does begin to make sense and is really a very powerful version control function.

这篇关于如何从Eclipse本地存储库中分离出Eclipse工作区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆