Git CMD

命令格式

git mv [-v] [-f] [-n] [-k] <source> <destination>

git mv [-v] [-f] [-n] [-k] <source> ... <destination directory>

命令参数

-f, --force
  即使目标文件存在也强制重命名或移动文件。

-k
  当移动或重命名操作会导致错误发生时则跳过。

-n, --dry-run
  不执行任何操作,仅仅显示将会发生什么。

-v, --verbose
  详细模式。

实例

a) 将 testfile.txt 重命名为 test.conf。

git mv testfile.txt test.conf

b) 将 test.conf 移动至 src 目录下。

git mv test.conf src/
原文地址:https://www.cnblogs.com/huey/p/5089818.html