7

我正在尝试将代码推送到远程仓库-

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'.

如何解决上述错误。

4

1 回答 1

7

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

git remote show uat或者git branch -r会告诉你你的uat遥控器有哪些分支。

于 2012-06-28T14:13:55.643 回答