2016-05-29 53 views
1

例如,看一下this commit什麼原因導致GitHub將提交顯示爲由一位用戶*提交給另一位用戶

enter image description here

注意如何兩個用戶都在這裏顯示,無論@unional和@blakeembrey。

這是什麼原因造成的?


編輯一些進一步的研究:

$ git clone [email protected]:typings/typings.git 
$ cd typings 
$ git show abea10b5787e1a18634d5f37bb2fa56550c32fd1 
commit abea10b5787e1a18634d5f37bb2fa56550c32fd1 
Author: Homa Wong <[email protected]> 
Date: Thu May 26 09:47:58 2016 -0700 

    Update `bundle` help (#557) 

diff --git a/src/bin-bundle.ts b/src/bin-bundle.ts 
index 8e6dd26..2af3599 100644 
--- a/src/bin-bundle.ts 
+++ b/src/bin-bundle.ts 
@@ -5,11 +5,10 @@ import { bundle } from 'typings-core' 

export function help() { 
    return ` 
-typings bundle --out <directory> 
+typings bundle --out <filepath> 

Options: 
- [--out|-o] <directory> The bundled output directory 
- [--name] <name>  Bundle module name 
+ [--out|-o] <filepath> The bundled output file path 
    [--global|-G]   Bundle as an global definition 
` 
} 

有趣的是有一個在承諾中提到只有一個用戶(unional)。這是否存儲在GitHub中的一些額外的元數據?


EDIT 2實際上似乎git show沒有給予充分的修補程序元數據。使用gitk我看到這個:

Author: Homa Wong <[email protected]> 2016-05-26 17:47:58 
Committer: Blake Embrey <[email protected]> 2016-05-26 17:47:58 
Parent: b79fd3f0f9af245a790717dcb5493fb49db2788d (Update README.md to add example of dt install (#547)) 
Branches: master, remotes/origin/master 
Follows: v1.0.4 
Precedes: 

    Update `bundle` help (#557) 

這裏我們可以看到不同的作者和參與者。看起來這是一個重新發布而不是合併的公關。

+0

筆者VS提交者 –

+0

的一個@ IsmailBadawi,我不相信就是這樣。看我的編輯。 –

回答

1

這是一個 合併 squash commit。當一個人通過合併合併拉請求/支全部提交到一個大的承諾,那些誰:

  • 創建拉入請求
  • 致力於將合併
  • 分支合併拉請求

將在創建的提交中顯示爲提交者。顯然,創建拉取請求的人可以在提交中獲得他/她的身份,並且將提交併壓扁他們的人存儲爲元數據。

在這種情況下:

  • unional是誰創造了拉請求,並取得了一個唯一的提交
  • blakeembrey是誰合併拉請求
+0

如果它是合併提交,爲什麼它只有一個父代? –

+0

@DrewNoakes等等,[這不是傳統的合併!](https://github.com/blog/2141-squash-your-commits) – dorukayhan

相關問題