本文介绍了推到远程回购给出的错误 - 仍然有裁判下的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图将代码推送到远程仓库 -

I am trying to push code to a remote repo -

git push uat release/1.1:release
Counting objects: 4047, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1679/1679), done.
Writing objects: 100% (4047/4047), 3.38 MiB | 1.79 MiB/s, done.
Total 4047 (delta 2160), reused 3666 (delta 1909)
remote: Switched to branch 'release'
To ubuntu@ubuntu-jvm:/repos/tms/uat
 * [new branch]      release/1.1 -> release
error: there are still refs under 'refs/remotes/uat/release'
error: Cannot lock the ref 'refs/remotes/uat/release'.

如何解决上述错误。

How do I resolve the above error.

推荐答案

我怀疑你的 uat 上有其他分支名为 release /< something> c $ c>远程。您正在运行的 push 命令试图将本地分支 release / 1.1 转换为远程分支 release ,但远程拒绝删除 release /< something> ,因为这会丢失信息。试试 git push uat release / 1.1:newrelease 或类似的东西,以避免试图将一个分支命名为与包含其他分支的子目录相同的分支的冲突不是真正的子目录,但是 git 可以在内部使用,它有时会作为一个实际的子目录存储)。

I suspect you have other branches named release/<something> on your uat remote. The push command you are running is trying to convert a local branch release/1.1 into a remote branch release, but the remote refuses to remove release/<something> because that would lose information. Try git push uat release/1.1:newrelease or something similar to avoid the conflict of trying to have a single branch named the same thing as a "subdirectory" containing other branches (it's not truly a subdirectory, but the way git works internally, it is sometimes stored as an actual subdirectory).

git remote show uat git branch -r 会显示您的 uat remote有。

git remote show uat or git branch -r will show you what branches your uat remote has.

这篇关于推到远程回购给出的错误 - 仍然有裁判下的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 23:40