3 回答

TA貢獻1772條經驗 獲得超5個贊
log
diff
log
man git-rev-parse
若要排除可從提交中訪問的提交,請使用前綴^表示法。例如,^r1 r2意味著從R2提交可到達的,但排除那些可從r1到達的提交。
這個集合操作經常出現,以至于它有一個縮寫。當您有兩個提交R1和R2(根據上面指定的修改中解釋的語法命名)時,您可以請求從R2可以到達的提交(不包括那些可以從r1到的提交),并且可以寫成“r1.r2”。
類似的表示法“R1.R2”被稱為R1和R2的對稱差,并被定義為“R1 R2-而不是$(git合并-基-所有r2)”。這是一組提交,可以從R1或R2之一訪問,但不能同時從兩者中訪問。
diff
man git-diff
git diff [--options] <commit>...<commit> [--] [<path>...] This form is to view the changes on the branch containing and up to the second <commit>, starting at a common ancestor of both <commit>. "git diff A...B" is equivalent to "git diff $(git-merge-base A B) B". You can omit any one of <commit>, which has the same effect as using HEAD instead.
..
git-diff
git diff A B
log

TA貢獻1812條經驗 獲得超5個贊
這個答案實際上是用一個簡潔的文本、例子和圖片來解釋這種區別。我更喜歡它比目前最高的投票的答案,它只是引用不明確的文件。(Tl;博士,多虧了這個答案,我才真正理解其中的不同之處。)
- 3 回答
- 0 關注
- 538 瀏覽
添加回答
舉報