How to use git mv from magit?
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.
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
For reference at least in current verion of magit there is
magit-file-rename which can be invoked by R.