Removing duplicate db migrations from git repository

前端 未结 1 1184
时光说笑
时光说笑 2021-02-05 18:18

I\'m trying to deploy a rails app to Heroku and I\'m running into some basic git problems. I\'m new to this all -- rails, git, heroku -- so I\'m afraid I\'m getting lost on what

1条回答
  •  后悔当初
    2021-02-05 18:55

    If you type "git status" it should show the inconsistency. It will say something like this:

    # On branch master
    # Changed but not updated:
    #   (use "git add/rm ..." to update what will be committed)
    #   (use "git checkout -- ..." to discard changes in working directory)
    #
    #       deleted:    db/migrate/20101007030431_create_favorites.rb
    

    So just follow the instructions there. To permanently remove it from the repository, type:

    git rm db/migrate/20101007030431_create_favorites.rb
    

    0 讨论(0)
提交回复
热议问题