2014-06-20 3 views
-1

Git을 사용하고 있지만 Github 계정 만 만들었습니다. Repo를 설정했지만 밀어 넣으려고하면 오류가 계속 발생합니다.Github repo로 푸시 할 수 없습니다.

error: failed to push some refs to ' https://github.com/username/myrepo.git '
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

나는 git pull 일을 시도했다하지만 난 당신이 병합되지 않은 파일을 가지고 있기 때문에 풀 수없는 얻을.

아이디어가 있으십니까?

+0

아직 병합 중임을 의미합니다. 병합하기 전에 병합을 해결해야합니다. – Amber

+0

[Git Pull is Unmerged Files] 복제본 (http://stackoverflow.com/q/15127078/456814). –

답변

0

체크 물건 다음 원격 저장소 http://git-scm.com/docs/git-diff 사이의 DIFF는 병합 할 파일을 병합하거나 로컬에 필요한 아무것도하지 않는 경우는 git checkout . 변경 사항을 제거하고 git pull에 수 원격 저장소를 그대로 당깁니다.

+0

나는 그것을 분류했습니다 - repo를 삭제하고, 새로운 것을 만들었고 작동합니다! – tommyd456

0

a similar question에 대한 해결책이 여기에 적용됩니다. 내가 링크

git fetch origin 
git reset --hard origin/master 

대답도 이유의 기술적 설명을 가지고하는 가장 쉬운 하나를 실행 한 후, 다른 폴더로 해당 지역의 repo를 백업하는 것입니다.

이외에도 git status은 (는) 가장 친한 친구입니다.