14
我的本地機器上有一個Facebook應用程序,另一個是用Heroku創建的(Heroku應用程序中的代碼是由Heroku自動創建的)。我想用我的本地機器上的代碼完全替換Heroku應用程序中的代碼。我已經在代碼所在的機器目錄中初始化了一個git倉庫,並且我已經使用git remote add origin [email protected]:my-fb-app.git
設置了URL。然而,當我在git push origin master
型我得到:如何完全替換git倉庫中的代碼
To [email protected]:my-fb-app.git
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:blooming-cove-5867.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull')
hint: before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
顯然,這是不正確的方法。我應該如何去做這件事?