2014-01-13 9 views
11

내 응용 프로그램의 코드를 저장소로 업데이트하려고하는데 오류가 나타납니다.'Git push heroku master'명령으로 오류가 발생했습니다.

어떻게 해결할 수 있습니까?

C:\Sites\ecozap>git push heroku master 
Enter passphrase for key '/c/Users/Diseño2/.ssh/id_rsa': 
Fetching repository, done. 
To [email protected]:ecozap.git 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to '[email protected]:ecozap.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. 

답변

31

이 오류는 Heroku가에 master 지점이 해당 지역의 지점에 하지입니다 커밋이 포함되어 있다는 것을 의미한다. 당신이 누락 당신에게 Heroku에 푸시를 강제 할 수 커밋 신경 쓰지 않는 경우,

git pull heroku master 

을 또는 :

당신에게 Heroku에서 누락 된 커밋을 끌어와 로컬 복사본으로 병합 할 수 있습니다. 이렇게하면 Heroku의 원격 저장소를 로컬 커밋으로 덮어 씁니다.

git push --force heroku master 

이 작업을 수행하여 Heroku가에서 그들에게을 잃게됩니다 당신이 정말로 그들 걱정하지 않는다 있는지 확인합니다. 일반적으로 Heroku는 정식 저장소가 아니기 때문에 중요하지 않습니다. GitHub와 같은 다른 곳도 있습니다.

관련 문제