问题
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 ?
回答1:
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.
来源:https://stackoverflow.com/questions/40895623/egit-commited-new-project-to-wrong-repository-can-not-delate-it