我注意到一個GitHub repository有零貢獻者與明顯的提交。這怎麼可能?GitHub倉庫如何提供零貢獻者和明顯的提交?
回答
修訂者電子郵件沒有與任何GitHub的帳戶相關聯。通過拾取隨機提交,添加添加後綴.patch
你可以看到這一點:
From 508b9f745dcfd9117367fa88e982bb739ecac616 Mon Sep 17 00:00:00 2001
From: atomiks <[email protected]>
Date: Wed, 22 Feb 2017 08:47:53 +1100
Subject: [PATCH] separate comments and submissions timeframes
...
的[email protected]
很可能不與任何GitHub的帳戶相關聯。
您可以創建以下步驟這樣的倉庫:
# Create the Git repo locally
$ mkdir foo
$ cd foo/
$ git init
Initialized empty Git repository in /.../foo/.git/
# Create some files
$ echo 'foo' > index.js
$ ls
index.js
# Create the commit, but pass an invalid email address
# or one you are sure that is not associated with *any*
# GitHub account
$ git add . -A
$ git commit -m 'Initial' . --author 'foo <[email protected]>'
[master a34597b] Initial
Author: foo <[email protected]>
Date: Wed May 31 13:51:19 2017 +0300
1 file changed, 1 insertion(+)
create mode 100644 index.js
# Add the GitHub url
$ git remote add origin [email protected]:IonicaBizau/tmp42.git
# Push the repo
$ git push --all
Counting objects: 3, done.
Writing objects: 100% (3/3), 271 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To github.com:IonicaBizau/tmp42.git
* [new branch] master -> master
然後GitHub庫頁面上,你會看到:
點擊提交網址並加入.patch
後綴(獲取原始信息):
From a34597b39da17eb77ab29f686a78b276a3c18376 Mon Sep 17 00:00:00 2001
From: foo <[email protected]>
Date: Wed, 31 May 2017 13:51:19 +0300
Subject: [PATCH] Initial
---
index.js | 1 +
1 file changed, 1 insertion(+)
create mode 100644 index.js
diff --git a/index.js b/index.js
new file mode 100644
index 0000000..257cc56
--- /dev/null
+++ b/index.js
@@ -0,0 +1 @@
+foo
@mythereal我剛剛添加了一個例子。您可以使用'--author'選項或編輯'.gitconfig'文件來更改提交的作者。 –
哇。非常感謝。這很有啓發。 – mythereal
@mythereal不客氣! :) –
- 1. Github顯示零貢獻者
- 2. Github無效作者電子郵件提交,無貢獻活動
- 3. GIT中對提交沒有顯示在GitHub的貢獻曲線
- 4. 未在GitHub上顯示爲貢獻者
- 5. Github私人信息庫和貢獻
- 6. github貢獻圖表不顯示我的貢獻
- 7. 用Heroku Github集成將舊的提交添加到Github貢獻記錄
- 8. 當混合貢獻者提交時推送權限被拒絕
- 9. 對git倉庫的全部貢獻
- 10. WordPress的貢獻者?
- 11. 讓貢獻者叉私人倉庫,但無助於掌握
- 12. Github沒有將我的團隊顯示爲貢獻者
- 13. 如何讓GitHub上的不可信貢獻者參與?
- 14. 如何檢索使用github api回購的所有貢獻者
- 15. Git貢獻者在github/etc中沒有正確顯示
- 16. 如何在Github上貢獻項目
- 17. 如何找到使用Octokit的GitHub倉庫提交數量?
- 18. 開始貢獻於Github
- 19. Git倉庫提交
- 20. 凱明提交新版本SVN倉庫
- 21. 爲什麼Github Gist的貢獻沒有得到反映到Github的貢獻?
- 22. 獲取對特定文件進行提交的貢獻者列表
- 23. 貢獻者如何在Azure中登錄?
- 24. Github.com,如何刪除貢獻者?
- 25. 如何找到Github倉庫的委員會和他們的提交次數
- 26. 顯示我在檔案中的貢獻者的存儲庫
- 27. 如何在git倉庫中重寫提交者名稱?
- 28. NET OpenId庫 - 提供者和消費者
- 29. 如何列出git存儲庫的貢獻者?
- 30. 如何在Confluence中顯示排名前10的貢獻者
你可以鏈接該存儲庫嗎? –
用存儲庫更新了問題。 – mythereal
似乎是更適合GitHub支持的問題,比SO –