我该如何解决这个问题?我想提交,但我得到以下错误.
git push origin monty_svm_dev
To git@github.com: ! [rejected] monty_svm_dev -> monty_svm_dev
(non-fast-forward) error: failed to push some refs to
'git@github.com:/mygit.git' To prevent you from losing history,
non-fast-forward updates were rejected Merge the remote changes before
pushing again. See the 'Note about fast-forwards' section of 'git
push --help' for details. root@li409-202:~/mypath#
Run Code Online (Sandbox Code Playgroud)
Mic*_*ant 31
做git pull origin monty_svm_dev第一
发生的事情是遥控器的最近更改比您的分支更新.
因此,在您进行push更改之前,您需要首先获取并合并远程更改.
您可以通过执行以下操作来执行此操作git checkout your_branch:
git fetch origin your_branch 然后一个
git merge your_branch
要么
git pull origin your_branch # fetch and merge in one operation
Run Code Online (Sandbox Code Playgroud)
你的分支是主人,或你的分支名称(monty_svm_dev我认为似乎在你的情况下)
一旦完成(并解决任何冲突),你可以做一个 git push origin monty_svm_dev
| 归档时间: |
|
| 查看次数: |
36179 次 |
| 最近记录: |