git mv
Moves or renames a file, directory, or symlink and stages the change.
Syntax
git mv <source> <destination>
Options
- -f / --force: Forces renaming or moving even if the target exists
- -n / --dry-run: Shows what would happen without actually moving
Example
git mv old-name.ts new-name.ts git mv src/utils.ts lib/utils.ts