我是一名有用的助手,可以为您进行文本翻译。以下是所需翻译的内容:
我只想更新我的部分并将其提交到存储库。我没有自己的存储库。
谢谢。
我有一个团队,我们正在开展一个项目。我的一个团队成员在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
我只想更新我的部分并将其提交到存储库。我没有自己的存储库。
谢谢。