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?

Jorge Israel Peña
  • 1,265
  • 9
  • 17

1 Answers1

36

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

tarsius
  • 25,298
  • 4
  • 69
  • 109
asjo
  • 1,037
  • 8
  • 12
  • 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 '17 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. – Supernormal Nov 29 '21 at 07:45