0

I was trying to fetch open PR's by running this command but I've created refs that are completely invalid:

git fetch origin '+refs/pull/*/merge:refs/remotes/$rem/open-pr/*' 

Now I can't delete them. They exist when running git branch -r:

 $rem/open-pr/139 $rem/open-pr/164 $rem/open-pr/165 $rem/open-pr/168 

I've tried deleting through a number of ways to no avail.

git fetch --prune git branch -D '$rem/open-pr/139' git branch -d '$rem/open-pr/139' git remote prune origin 
2
  • 2
    AFAIU $rem is a literal here, not a placeholder? git branch -d -r '$rem/open-pr/139' See stackoverflow.com/a/5096739/7976758 Found in stackoverflow.com/… Commented Dec 22, 2023 at 21:08
  • That was it, forgot the -r Commented Dec 23, 2023 at 4:34

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.