Also see the git-fetch(1) manpage. For information about the upstream and the push-remote, see The Two Remotes.
This transient prefix command binds the following suffix commands along with the appropriate infix arguments and displays them in a temporary buffer until a suffix is invoked.
This command fetches from the current push-remote.
With a prefix argument or when the push-remote is either not configured or unusable, then let the user first configure the push-remote.
This command fetch from the upstream of the current branch.
If the upstream is configured for the current branch and names an existing remote, then use that. Otherwise try to use another remote: If only a single remote is configured, then use that. Otherwise if a remote named "origin" exists, then use that.
If no remote can be determined, then this command is not available
magit-fetch transient prefix and invoking it directly
results in an error.
This command fetch from a repository read from the minibuffer.
This command fetches a branch from a remote, both of which are read from the minibuffer.
This command fetches from a remote using an explicit refspec, both of which are read from the minibuffer.
This command fetches from all remotes.
This command fetches all submodules. With a prefix argument it fetches all remotes of all submodules.
By default fetch and pull commands are available from separate
transient prefix command. Setting this to
t adds some (but not all)
of the above suffix commands to the
If you do that, then you might also want to change the key binding for these prefix commands, e.g.:
(setq magit-pull-or-fetch t) (define-key magit-mode-map "f" 'magit-pull) ; was magit-fetch (define-key magit-mode-map "F" nil) ; was magit-pull