7.1.2 Remote Git Variables

These variables can be set from the transient prefix command magit-remote-configure. By default they can also be set from magit-remote. See Remote Commands.

Variable: remote.NAME.url

This variable specifies the url of the remote named NAME. It can have multiple values.

Variable: remote.NAME.fetch

The refspec used when fetching from the remote named NAME. It can have multiple values.

Variable: remote.NAME.pushurl

This variable specifies the url used for pushing to the remote named NAME. If it is not specified, then remote.NAME.url is used instead. It can have multiple values.

Variable: remote.NAME.push

The refspec used when pushing to the remote named NAME. It can have multiple values.

Variable: remote.NAME.tagOpts

This variable specifies what tags are fetched by default. If the value is --no-tags then no tags are fetched. If the value is --tags, then all tags are fetched. If this variable has no value, then only tags are fetched that are reachable from fetched branches.

Variable: remote.NAME.followRemoteHEAD

How "git fetch" handles updates to "remotes/<remote>/HEAD".

This command sets the local value of the Git variable remote.<remote>.followRemoteHEAD, where <remote> is a stand-in for the actual remote, as displayed in the menu, from which this command is invoked. This variable is documented in the git-config(1) manpage.

Unfortunately Git does not provide a variable to set a default for all remotes of all repositories, but you can set the global value for a remote name used in multiple repository, which will then be used as the default for that remote in all repositories. You should consider using "always" for remotes named "origin".