Push to remote repo gives an error - there are still links to

I am trying to push the 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 to fix the above error.

+6
source share
1 answer

I suspect you have other branches named release/<something> on the uat remote. The push command that you run tries to convert the local release/1.1 branch to the remote release branch, but the remote user refuses to remove release/<something> because it will lose information. Try git push uat release/1.1:newrelease or something similar to avoid conflict with trying to create a single branch named "subdirectory" containing other branches (this is not a true subdirectory, but the git method works inside, it is sometimes stored as the actual subdirectory )

git remote show uat or git branch -r will show you which branches of your uat remote.

+6
source

Source: https://habr.com/ru/post/919245/


All Articles