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.
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store