【发布时间】:2015-11-12 12:34:50
【问题描述】:
我的项目在 gitlab 上有一个 repo。我首先在 Windows 上提交并推送这个项目。在 ubuntu 上创建 VM 并复制粘贴我的项目文件夹后。我在 ubuntu 上继续我的项目,并且我确实提交了(没有推送)。我不再使用我的 Windows 项目。现在,当我想推送项目(ubuntu)时出现错误。我认为我有冲突和合并问题。
我如何在回购中push我的项目。我尝试pull,fetch,但没有。
错误是:
! [rejected] master -> master (non-fast-forward)
impossible to push references to 'repo'
tip: The updates were rejected because the head of the current branch is behind its remote peer. Integrate remote changes (eg 'git pull ...') before pushing again.
之后,当我执行 git pull origin master 时,我与许多文件发生了很多冲突。
你能帮帮我吗?
【问题讨论】:
-
你不应该复制工作副本,你应该从 gitlab 克隆 repo。