Delete a branch with refs/ in it's name

50 views
Skip to first unread message

Dmitry P

unread,
Jul 10, 2024, 8:15:42 AM (12 days ago) Jul 10
to Repo and Gerrit Discussion
Gerrit 3. git ls-remote https://admin@localhost|grep master

6c40263e2e425a4ba698d3ddac5dabef3a3fad45        refs/heads/infinity-initial-master
4cb1920407b3f04223f50036daafaf18076d01cd        refs/heads/infinity-initial-master-back1026
0f74b3b8b696c2c49cec002fa617f194e36abe4e        refs/heads/infinity-initial-master-backup
4f55d4545cff669e5f06165f078ab21354764572        refs/heads/master
a27e5c373678d6da9ad54987c75dc21cc05e6f52        refs/master

How can I delete a27e5c373678d6da9ad54987c75dc21cc05e6f52        refs/master? If it's possible

Matthias Sohn

unread,
Jul 10, 2024, 8:25:32 AM (12 days ago) Jul 10
to Dmitry P, Repo and Gerrit Discussion
Did you try `git push origin -d refs/master` ? For that you need the Gerrit delete permission on refs/master or refs/*.

if this doesn't work try this on the bare repository in the gerrit site

cd $gerrit_site/git/<repo path>
git update-ref -d refs/master
 
--
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en

---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/repo-discuss/1c895a35-e9a2-4c5d-9b36-e01a71f07b49n%40googlegroups.com.

Dmitry P

unread,
Jul 11, 2024, 3:41:50 AM (11 days ago) Jul 11
to Repo and Gerrit Discussion
To ssh://localhost:29418/pc/myrepo
! [remote rejected]       refs/master (internal error)
error: failed to push some refs to 'ssh://localhost:29418/pc/myrepo  '

In error_log I see multiple occurrences of this error as a SSH git-receive-pack:
 WARN  com.google.gerrit.server.git.MultiProgressMonitor : MultiProgressMonitor worker did not call end() before returning
 ERROR com.google.gerrit.server.git.receive.AsyncReceiveCommits : error while processing push

I'm going to try with git update-ref

Dmitry P

unread,
Jul 11, 2024, 4:36:18 AM (11 days ago) Jul 11
to Repo and Gerrit Discussion
git update-ref worked like a charm, thank you very much
Reply all
Reply to author
Forward
0 new messages