Git

git mv

SafeTracked rename/move

git mv <old> <new>

Moves and stages in one step so Git records a rename and history stays followable.

Examples

  • git mv util.py lib/util.pyRecord a move

Syntax

git mv <source> <dest>

Before you run it

Moves the file in the working tree.

Related commands

The same reference, with no signal at all

Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.

Get it free on the App Store