33

The manual's introduction says:

Magit wraps and in many cases improves upon at least the following Git porcelain commands: add, am, bisect, blame, branch, checkout, cherry, cherry-pick, clean, clone, commit, config, describe, diff, fetch, format-patch, init, log, merge, merge-tree, mv, notes, pull, rebase, reflog, remote, request-pull, reset, revert, rm, show, stash, submodule, and tag.

However, I can't quite figure out how to actually move a file from it. Sure I can just run git mv, but taking that to the logical extreme we might as well just use git instead of Magit :P Considering the manual mentions mv, I wonder if that's a mistake or not.

I only found this old question but it's very old by Magit standards. Perhaps things have changed?

0

1 Answer 1

36

magit-file-rename is bound to R in magit-mode buffers.

2
  • 12
    Please remember that the Magit status buffer uses context-sensitive keymaps! When the status buffer shows no files (as in: your working tree is clean), you have to move point to the last empty line at the bottom of this buffer and then hit R to execute magit-file-rename. If point is within a line which shows a branch (like master), hitting R will execute magit-branch-rename instead. Took me a while to figure this out.
    – ack
    Apr 13, 2017 at 14:55
  • The first empty line will also work. Just as long as the point is not on one of the branch names near the top. Nov 29, 2021 at 7:45

Your Answer

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

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