【发布时间】:2019-05-12 00:52:02
【问题描述】:
每次我尝试推送到 Github 时都会收到一条错误消息:
Dominics-Air:django dominic.$ git push -u origin master
To https://github.com/domtom1126/django.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'https://github.com/gomtom1126/django.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 tot first integrate the remote changes
hint: (g.h., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.
Dominics-Air:django dominic.$
我尝试在不同的路径上安装 git,但没有任何效果。我正在使用运行 Mojave 的 MacBook Air。
【问题讨论】:
-
您没有阅读错误信息。它为您提供了问题的可能原因以及您可以采取哪些措施来解决它。
标签: git