magit

How do I set variable `remote.pushDefault` for an existing repository in Magit?


In an existing repository, how do I set the local variable remote.pushDefault?

Short of doing it manually:

git config remote.pushDefault origin

I'm not looking to set it up for new repositories, or for origins that I add through magit--I want to do this on existing repos that I've already cloned somehow.

Is there an easy way to access this configuration through magit?


Solution

  • Use the fetch -> configure menu: f C P

    enter image description here

    Cycle through remotes using P.

    N.B.: That configure menu is primarily for configuring a specific branch, but it also offers some options that affect the entire repository (under "repository defaults").