阅读git-status man page时,我读到了有关旗帜的内容:
`R`: file renamed
`C`: file copied
`U`: file updated但是如何在git-status命令中获得这些标志呢?如果为git mv,则产生A标志,则不存在git cp。这些标志是否已弃用?
发布于 2018-12-22 23:47:14
R和U非常简单:
$ git init
$ touch ag
$ git add a
$ git commit -mm
$ git mv a b
$ git status --short
R a -> b$ git init
$ touch a
$ git add a
$ git commit -mm
$ git checkout -b dev
$ echo a > a
$ git commit -amm
$ git checkout -
$ echo b > a
$ git commit -amm
$ git rebase dev
$ git status --short
UU a但我不知道如何模拟C。在这个答案中,https://stackoverflow.com/a/22798751/3691891说这在今天可能是不可能的,尽管它仍然是在git源代码中用Documentation/git-status.txt描述的。
https://stackoverflow.com/questions/53896868
复制相似问题