简体   繁体   English

将更改从Bitbucket更新到Eclipse中的本地git存储库?

[英]Update changes from Bitbucket to local git repository in Eclipse?

I have a repository on bitbucket and I was able to successfully import the repository to Eclipse to work on the java files but I've run into a problem. 我在bitbucket上有一个存储库,并且能够成功将存储库导入Eclipse以在Java文件上工作,但是遇到了问题。 I can't seem to update Eclipse to accommodate for the commits made to the Bitbucket git repository. 我似乎无法更新Eclipse以适应对Bitbucket git存储库所做的提交。 I've tried to import again and and I used pull but none of the changes appear on eclipse. 我尝试再次导入,并且使用了pull,但是在eclipse上都没有出现任何更改。 When I try import it says the .project file already exists in the directory. 当我尝试导入时,它说.project文件已存在于目录中。 When I use pull it says everything is up to date so I figured I'm using pull incorrectly. 当我使用pull时,它说一切都是最新的,所以我觉得我使用的pull不正确。 Can anyone help me out? 谁能帮我吗?

You should precise more details to get an answer. 您应该精确化更多细节以获得答案。

If you did all the steps correctly, for example from this tutorial: http://crunchify.com/how-to-configure-bitbucket-git-repository-in-you-eclipse/ you won't have problems. 如果您正确执行了所有步骤,例如本教程中的内容: http : //crunchify.com/how-to-configure-bitbucket-git-repository-in-you-eclipse/您将不会有问题。

Try to delete all the files from the folder that you have imported, and try again. 尝试从导入的文件夹中删除所有文件,然后重试。

When I try import it says the .project file already exists in the directory 当我尝试导入时,它说.project文件已存在于目录中

That is expected: you would need to delete the project from the eclipse workspace (not from the disk) to reimport it again. 这是预料之中的:您需要从Eclipse工作区(而不是从磁盘)中删除项目,然后再次将其重新导入。 But its content would be identical. 但是其内容将是相同的。

Check a git status on the command line to see if you are on a branch or in a detached HEAD . 在命令行上检查git状态,以查看您是在分支中还是在分离的HEAD中
You can also see it in the history view of eclipse. 您也可以在Eclipse的历史记录视图中看到它。
A detached HEAD would explain why a pull doesn't refresh anything. 分离的HEAD会解释为什么拉动不会刷新任何内容。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM