How to use git mv from magit?

Is there a nice way to call git mv on a file from within magit? I know it’s possible to run any git command with :, but this won’t autocomplete filenames.

  • Howt to tell emacs VC that I want a file to be managed by git not by svn when the file is under both version systems?
  • What is the state of GIT IDE plugins in 2010?
  • How to do a “git checkout -f” from emacs-git?
  • why is vc-git and magit in emacs ignoring my git config settings?
  • How to Use Magit Even More Effectively?
  • Git branch name in ps-left-header
  • Git Bash: Launch Application via Alias without hanging Bash (WIndows)
  • Able to recover a deleted branch using git tag
  • Get latest git tag in Ruby for use with Capifony
  • git diff-tree shows a delete but there's no delete in git log
  • How do I pass a literal forward slash into Node.js in Git Bash for Windows?
  • Force my local master to be origin/master
  • 3 Solutions collect form web for “How to use git mv from magit?”

    I’m not sure offhand if there’s a direct way, but…

    Given that a mv is the same thing as a rm plus an add, you can just rename the file normally (e.g. in dired), and then stage both of the consequent changes — a deleted file and a new file.

    Git should figure it out.


    M-x vc-rename-file ?

    I use dired for this. C-x d when the file is open, then press ! on the file to run git mv ? newpath command with the file as the ? argument.

    For reference at least in current verion of magit there is magit-file-rename which can be invoked by R.

    Git Baby is a git and github fan, let's start git clone.