Command

git mv

Moves a tracked path and stages the path change. Inspect the staged comparison; rename detection compares content rather than recording a special rename object.

Formal Syntax & Structure

git syntaxgit
git mv [options] -- source destination

Working Example

Example Snippetgit
git mv -- notes.txt shopping.txt
Git Reference