git push 명령을 사용했으며 지금까지 예상대로 작동했습니다. 오늘 git 명령을 테스트하는 동안 마스터 대신 HEAD로 푸시하면 아래 표시된 오류없이 작동한다는 것을 알았습니다. 이 두 명령의 차이점을 배우고 올바른 명령을 선택할 수 있습니다. 머리로 밀어github에 파일 푸시
는# git push origin master
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of known hosts.
To [email protected]:shan/mobileapp
! [rejected] master -> master (non-fast-forward)
error: failed to push some refs to '[email protected]:shan/mobileapp'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again. See the
'Note about fast-forwards' section of 'git push --help' for details.
# git push origin HEAD
Warning: Permanently added 'github.com,192.30.252.129' (RSA) to the list of known hosts.
Counting objects: 23, done.
Compressing objects: 100% (18/18), done.
Writing objects: 100% (19/19), 2.56 KiB, done.
Total 19 (delta 11), reused 0 (delta 0)
To [email protected]:shan/mobileapp
* [new branch] HEAD -> topic/wip
만든 것 같다 지점이라고 지금 마스터와 가지 주제/WIP를 병합 할 수 있습니다
주제/WIP. 그러나 위에서 언급 한 첫 번째 명령이 예상대로 작동하기를 바랍니다. 마스터와 병합 할 임시 분기를 만들 필요가 없습니다.
오류 메시지에 설명 된대로 원본/마스터를 밀어 넣기 전에 병합해야합니다. – geoffspear