Git mv 命令

更新时间: 2019-07-13 17:17

git-mv - Move or rename a file, a directory, or a symlink

语法

git mv <options>... <args>...

参数

-f, --force
    Force renaming or moving of a file even if the target exists

-k
    Skip move or rename actions which would lead to an error condition. An error happens when a source is neither existing nor
    controlled by Git, or when it would overwrite an existing file unless -f is given.

-n, --dry-run
    Do nothing; only show what would happen

-v, --verbose
    Report the names of files as they are moved.

使用示例

# 改名文件,并且将这个改名放入暂存区
$ git mv [file-original] [file-renamed]

查看更多 git mv 命令的使用方法,可以使用命令:

git help mv
Head First Design Patterns

Head First Design Patterns

Elisabeth Freeman、Eric Freeman、Bert Bates、Kathy Sierra、Elisabeth Robson / O'Reilly Media / 2004-11-1 / USD 49.99

You're not alone. At any given moment, somewhere in the world someone struggles with the same software design problems you have. You know you don't want to reinvent the wheel (or worse, a flat tire),......一起来看看 《Head First Design Patterns》 这本书的介绍吧!

HTML 编码/解码

HTML 编码/解码

HTML 编码/解码

Base64 编码/解码

Base64 编码/解码

Base64 编码/解码

正则表达式在线测试

正则表达式在线测试

正则表达式在线测试