Mauricio Scheffer Mauricio Scheffer - 1 year ago 89
Git Question

What's the purpose of git-mv?

From what I understand, Git doesn't really need to track file rename/move/copy operations, so what's the real purpose
of git mv? The man page isn't specially descriptive...

Is it obsolete? Is it an internal command, not meant to be used by regular users?

Answer Source
git mv oldname newname

is just shorthand for:

mv oldname newname
git add newname
git rm oldname

i.e. it updates the index for both old and new paths automatically.

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