Yossarian Yossarian - 1 year ago 119
Git Question

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.

Answer Source

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 ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download