Git · Everyday workflow

git mv

Renames a file and records the move for Git.

Syntax
git mv <from> <to>

Example

Example
git mv old-name.ts new-name.ts

More in this group

git add git blame git commit git commit --amend git diff git fetch git log git pull

Learn this in the course

Reference pages are the quick answer. The course explains the why, shows the full example and ends with a challenge.

Open the course