Next: , Previous: , Up: Transferring   [Contents][Index]


7.2 Fetching

Also see the git-fetch(1) manpage. For information about the upstream and the push-remote, see The Two Remotes.

f     (magit-fetch)

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.

f p     (magit-fetch-from-pushremote)

This command fetches from the push-remote of the current branch.

When magit-remote-set-if-missing is non-nil and the push-remote is not configured, then configure it before fetching. With a prefix argument let the user change the push-remote before fetching from it.

f u     (magit-fetch-from-upstream)

This command fetch from the upstream of the current branch.

When magit-remote-set-if-missing is non-nil and the upstream is not configured, then configure it before fetching. With a prefix argument let the user change the upstream before fetching from it.

f e     (magit-fetch-other)

This command fetch from a repository read from the minibuffer.

f o     (magit-fetch-branch)

This command fetches a branch from a remote, both of which are read from the minibuffer.

f r     (magit-fetch-refspec)

This command fetches from a remote using an explicit refspec, both of which are read from the minibuffer.

f a     (magit-fetch-all)

This command fetches from all remotes.

f m     (magit-submodule-fetch)

This command fetches all submodules. With a prefix argument it fetches all remotes of all submodules.

User Option: magit-pull-or-fetch

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 magit-pull transient.

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

Next: , Previous: , Up: Transferring   [Contents][Index]