git - Can't remove files on github -
update
i have deleted files individually selecting them on github. know better solution problem.
i made ruby on rails app , uploaded code on github. repo may seen at:
brainstorm-quiz-website-engine.
when working on file added database named levels mistake, deleted it(by right-clicking on , clicking on delete, in hindsight stupid way) , pushed commit.
but when clone repo error
rake aborted!multiple migrations have name createlevels
how can remove these multiple migrations github repo, nobody gets error on running rake db:migrate
right now, have three migrations called 'create_levels', of try create 'levels' table. fix this, need remove files, , remove them git.
first of all, make sure you're working up-to-date, clean git branch:
rohit@foo brainstorm $ git fetch rohit@foo brainstorm $ git status on branch master nothing commit, working directory clean
that's want see. if tells you're ahead/behind origin/master
, git push
or git pull
.
once you're in clean git repository, can remove 2 of migrations project. i've presumed want keep recent one. have tell git want files removed. can both tasks @ once git rm
:
rohit@foo brainstorm $ git rm db/migrate/db/migrate/20140123085020_create_levels.rb rohit@foo brainstorm $ git rm db/migrate/20140130045634_create_levels.rb
now can commit removal, , push repo:
rohit@foo brainstorm $ git commit -m "remove duplicate migrations creating levels table." rohit@foo brainstorm $ git push
and should able check out repository , run rake db:migrate
without problems.
Comments
Post a Comment