⊗gtPmBsFM 25 of 65 menu

Moving Files in Git

The mv command is also used to move files. Let's move a file from one folder to another, for example:

git mv old/file.txt new/file.txt

In this case, after checking the status of the files in the terminal, a message will be displayed about renaming the file, not about moving it:

Changes to be committed: renamed: old/old.txt -> new/new.txt

The fact is that operating systems are designed in such a way that renaming files and moving them are identical.

Move any file in your repository.

enru