Skip to content

Unable to get all branches using remote set-branches origin '*' command #3659

Answered by dscho
Ekopalypse asked this question in Q&A
Discussion options

You must be logged in to vote

C:\temp\sdl>git remote set-branches origin '*'

If you have a look at the output of git config -l --local, you will notice that the single-quote characters are still there, which means that Git will then try to pull all branches whose names start and end with a single-quote character. That does not make sense, of course, as single-quote characters are not allowed in ref names.

The problem here is that CMD simply does not interpret the single-quote character as you probably expected. It does not treat it as a quoting anything at all.

You will want to use double-quote characters instead:

C:\temp\sdl>git remote set-branches origin "*"

Make sure to verify the result via git config -l --local

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Ekopalypse
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3656 on January 28, 2022 08:29.