Next: , Up: Remotes   [Contents][Index]


7.1.1 The Remote Popup

The popup magit-remote-popup is used to add remotes and to make changes to existing remotes. This popup only deals with remotes themselves, not with branches or the transfer of commits. Those features are available from separate popups.

Also see the git-remote(1) manpage.

M     (magit-remote-popup)

This prefix command shows the following suffix commands along with the appropriate infix arguments in a popup buffer.

User Option: magit-remote-popup-show-variables

This option controls whether the magit-remote-popup shows remote related Git variables. When set to nil, no variables are displayed directly in this popup, and the sub-popup magit-remote-config-popup has to be used instead to view and change remote related variables.

M C     (magit-remote-config-popup)

This command shows remote related variables in a separate popup. By default this asks the user for which remote the variables should be shown. When magit-remote-popup-show-variables is nil, then it shows the variables for the upstream of the current branch or "origin" it that branch has no remote upstream. To select another remote use a prefix argument.

M a     (magit-remote-add)

This command add a remote and fetches it. The remote name and url are read in the minibuffer.

M r     (magit-remote-rename)

This command renames a remote. Both the old and the new names are read in the minibuffer.

M u     (magit-remote-set-url)

This command changes the url of a remote. Both the remote and the new url are read in the minibuffer.

M k     (magit-remote-remove)

This command deletes a remote, read in the minibuffer.

M p     (magit-remote-prune)

This command removes stale remote-tracking branches for a remote read in the minibuffer.

M P     (magit-remote-prune-refspecs)

This command removes stale refspecs for a remote read in the minibuffer.

A refspec is stale if there no longer exists at least one branch on the remote that would be fetched due to that refspec. A stale refspec is problematic because its existence causes Git to refuse to fetch according to the remaining non-stale refspecs.

If only stale refspecs remain, then this command offers to either delete the remote or to replace the stale refspecs with the default refspec ("+refs/heads/*:refs/remotes/REMOTE/*").

This command also removes the remote-tracking branches that were created due to the now stale refspecs. Other stale branches are not removed.

User Option: magit-remote-add-set-remote.pushDefault

This option controls whether the user is asked whether they want to set remote.pushDefault after adding a remote.

If ask, then users is always ask. If ask-if-unset, then the user is only if the variable isn’t set already. If nil, then the user isn’t asked and the variable isn’t set. If the value is a string, then the variable is set without the user being asked, provided that the name of the added remote is equal to that string and the variable isn’t already set.


Next: , Up: Remotes   [Contents][Index]