【发布时间】:2020-08-07 02:11:25
【问题描述】:
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 新手,所以我们正在办公室做一个项目,我们正在使用 bitbucket。 我已经提交并推送了一些代码行。 对同一个 PR,另一个人推送了他们的代码。 我怎样才能将他们的代码拉到我的本地仓库?
我没有用他们的代码更新我的代码,当我尝试推送我的代码时出现上述错误。 强制推送后,他们的提交被覆盖。
【问题讨论】:
-
git push -f origin master