0

我正在尝试部署到远程服务器,这是我得到的错误 -

git push uat release/1.1:release
To ubuntu@ubuntu-jvm:/repos/tms/uat
 ! [rejected]        release/1.1 -> release (non-fast-forward)
error: failed to push some refs to 'ubuntu@ubuntu-jvm:/repos/tms/uat'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote changes (e.g. 'git pull') before pushing again.  See the
'Note about fast-forwards' section of 'git push --help' for details

当我尝试从遥控器拉出时,这是我得到的错误:

git pull uat release:release/1.1
remote: Counting objects: 58, done.
remote: Compressing objects: 100% (33/33), done.
remote: Total 35 (delta 17), reused 8 (delta 0)
Unpacking objects: 100% (35/35), done.
From ubuntu-jvm:/repos/tms/uat
 ! [rejected]        release    -> release/1.1  (non-fast-forward)

我在远程位置有一个裸露的 git 存储库。

我该如何解决?

4

1 回答 1

0

您的两个存储库不同步。您将需要处理本地存储库上的任何合并冲突,然后再次推送。

git checkout release/1.1
git fetch --all
git merge origin/release
# resolve conflicts
git commit -av
git push
于 2012-06-28T10:17:05.803 回答