git-mv
Move or rename tracked files
TLDR
Rename a file
SYNOPSIS
git mv [options] source destination
DESCRIPTION
git mv moves or renames files and directories while updating the Git index. It is equivalent to moving the file with `mv`, deleting the old path with `git rm`, and adding the new path with `git add`.
Using this command ensures the rename is properly staged for the next commit. While Git can detect renames automatically through content analysis, using `git mv` makes the intent explicit and updates the index in one step.
PARAMETERS
SOURCE
File or directory to move.DESTINATION
Target path or directory.-f, --force
Force move/rename.-k
Skip errors.-n, --dry-run
Show what would happen.-v, --verbose
Report moved files.--help
Display help information.
CAVEATS
Actually a convenience wrapper. Git detects renames anyway. History follows content, not command.
HISTORY
git mv is a core Git command providing explicit rename/move tracking, though git can detect renames automatically through content analysis.
