나는 팀을 가지고 있으며 우리는 프로젝트를 진행 중이다. 우리 팀원 중 한 명이 GitHub에 저장소를 만들고 다른 사람을 공동 작업자로 추가했습니다. 우리 팀원은이 저장소에 코드를 위탁했습니다. 나는 내 부분에서 변화를 가졌고, 그것을 저지하려고 할 때 나는 오류가있다. 공동 작업자 인 저장소에 변경 사항을 적용하려면 어떻게해야합니까?힘내 : 밀어 넣기 거부
git remote add origin https://github.com/xxx/xxx.git (added a repository where I'm a collaborator)
`git push origin master
To https://github.com/xxx/xxx.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/xxx/xxx.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 origin master
warning: no common commits
remote: Counting objects: 145, done.
remote: Compressing objects: 100% (60/60), done.
remote: Total 145 (delta 67), reused 145 (delta 67), pack-reused 0
Receiving objects: 100% (145/145), 55.90 KiB | 0 bytes/s, done.
Resolving deltas: 100% (67/67), done.
From https://github.com/xxx/xxx
* branch master -> FETCH_HEAD
* [new branch] master -> or/master
fatal: refusing to merge unrelated histories
난 그냥 내 일부를 업데이트하고 저장소에 커밋 할 : 내가 무슨 짓을
. 나 자신의 저장소가 없다.
는
* "경고 : 공통 커밋"하게 * - 둘 않았다 빈 레포에서 시작 하시겠습니까? 물론 리모콘이 맞습니까? – jonrsharpe
우리 모두는 랩톱에서 동일한 코드를 사용합니다. 그런 다음, 내 temmember repo 만들고 모든 코드를 그것에 위탁했다. 나는 코드의 일부분을 조금 변경했는데 이제는 커밋 할 수 없다. ( – AnaF
변경 사항을 추가하기 전에 해당 레포에서 풀어 냈는가? 사전 레포 버전의 코드에서 시작한 경우, 그것을 복제 한 다음 변경 사항을 추가하십시오 – jonrsharpe