Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Undo set-branches on git remote

Tags:

I've currently set up my git remote to restrict which branches are fetched:

git remote set-branches myOrigin myBranch

This adds the proper entries to .git/config:

[remote "myOrigin"]
    fetch = +refs/heads/myBranch:refs/remotes/myOrigin/myBranch

Now I want to undo this, and go back to the default configuration:

[remote "myOrigin"]
    fetch = +refs/heads/*:refs/remotes/myOrigin/*

How can I do this without manually modifying my .git/config? Is there a git command I can run?

like image 981
metacubed Avatar asked Dec 09 '17 06:12

metacubed


1 Answers

Simply use quoted star:

git remote set-branches myOrigin '*'
like image 158
zigarn Avatar answered Sep 22 '22 13:09

zigarn