Git · Senior · Question 17 of 76

What is a refspec, like +refs/heads/*:refs/remotes/origin/*?

Explanation

This default fetch refspec copies every remote branch into origin/*; + allows non-fast-forward updates. Custom refspecs fetch PR refs or mirror repositories.

Further reading

Problem with a question

Git · Senior · question 17

Test yourself

Take the Git · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz