Egit - 将新项目提交给错误的存储库,不能评估它 [英] Egit - commited new project to wrong repository, can not delate it

查看:230
本文介绍了Egit - 将新项目提交给错误的存储库,不能评估它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近创建了一个新项目( FirstSimpleWebDataBase ),并将其提交给新的repo。
今天我正在开发我的旧项目( BeamReinforcement )并且意外地将整个 firstSimpleWebDataBese 项目推送到它的存储库中。



当我在Github检查回购时,它显示了这一点:

父级索引中的特殊条目



您可以在本地执行的操作是确保该文件夹已被删除:




  • 确保将FirstSimpleWebDatabase在Git repo文件夹之外

  • 输入:

      git rm --cached FirstSimpleWebDatabase#没有结尾斜杠
    git add。
    git commit -m删除FirstSimpleWebDatabase gitlink的记录
    git push


>

然后你可以回到Egit并从那里继续。


I recently created new project ("FirstSimpleWebDataBase") and committed it to new repo.
Today I was working on my old project ( "BeamReinforcement" ) and accidentally pushed whole "firstSimpleWebDataBese" project into it's repository.

When I check repo at Github it's shows this:

Added by accident project is grey and I would like to delete it.
I checked history in EGit but there is not such commit so I can not reverse it from eclipse. How can I fix it ?

解决方案

That gray folder is a gitlink (a special entry in the parent index)

What you can do locally is make sure that folder is removed:

  • make sure to move FirstSimpleWebDatabase outside the Git repo folder
  • type:

    git rm --cached FirstSimpleWebDatabase  # no trailing slash
    git add .
    git commit -m "record deletion of FirstSimpleWebDatabase gitlink"
    git push
    

Then you can go back to Egit and go on from there.

这篇关于Egit - 将新项目提交给错误的存储库,不能评估它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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