Currently, running vc-update in my Emacs runs git pull. Is there a way to customize it so that it runs something different like git pull --prune? Is it even advisable to do that?

1 Answer 1


Looking at the source of vc-update and vc-git-pull (the function that is called by vc-update when using a git backend), there doesn't seem to be a straightforward way to permanently customize the pull command that gets run (short of redefining vc-git-pull).

However, a quick look at the documentation for vc-update (via C-h f vc-update RET) tells you:

[...] On a distributed version control system, this runs a "pull" operation to update the current branch, prompting for an argument list if required. Optional prefix ARG forces a prompt.

In other words, if you want to alter the pull command that vc-update uses, just prefix the call with C-u. You'll get a prompt that says:

Git pull command: git pull

You can then append --prune and hit RET.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.