Files
tldr/pages/common/git-mv.md
Igor Shubovych 3839223635 git-mv: add page
2015-12-20 00:12:16 +02:00

16 lines
359 B
Markdown

# git mv
> Move or rename files and update the git index.
- Move file inside the repo and add the movement to the next commit
`git mv {{path/to/file}} {{new/path/to/file}}`
- Rename file and add renaming to the next commit
`git mv {{filename}} {{new_filename}}`
- Overwrite the file in the target path if it exists
`git mv --force {{file}} {{target}}`