首页 > 解决方案 > .. 在 git 命令中是什么意思?

问题描述

我明白是什么git cherrypick commitA..commitB;我刚刚看到你也可以使用 .. in git diff。我不明白为什么那里有必要。

..有一致的意思吗?是什么..master意思git diff ..master

标签: git

解决方案


相关的 Git 手册man git-diff说:

git diff [<options>] <commit> <commit> [--] [<path>...]
    This is to view the changes between two arbitrary <commit>.

git diff [<options>] <commit>..<commit> [--] [<path>...]
    This is synonymous to the previous form. If <commit> on one
    side is omitted, it will have the same effect as using HEAD
    instead.

推荐阅读