我注意到一个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 API列出所有贡献者到一个私人github仓库
- 6. 备份github仓库,分支和提交?
- 7. Github贡献图
- 8. Github私人信息库和贡献
- 9. github贡献图表不显示我的贡献
- 10. 获取Github个人文件贡献者
- 11. github graphql查询项目贡献者
- 12. 用Heroku Github集成将旧的提交添加到Github贡献记录
- 13. 当混合贡献者提交时推送权限被拒绝
- 14. 找不到在提交特定贡献者
- 15. 对git仓库的全部贡献
- 16. WordPress的贡献者?
- 17. 获取存储库中所有贡献者的提交历史记录
- 18. 让贡献者叉私人仓库,但无助于掌握
- 19. Github没有将我的团队显示为贡献者
- 20. 如何检索使用github api回购的所有贡献者
- 21. 如何让GitHub上的不可信贡献者参与?
- 22. 从MediaWiki中提取页面标题和贡献者XML
- 23. Github贡献表中未显示进度?
- 24. 如何在日期活跃的Git仓库中列出贡献者?
- 25. 如何在Github上贡献项目
- 26. 我如何向github贡献补丁?
- 27. Git贡献者在github/etc中没有正确显示
- 28. 如何撤消对GitHub仓库的提交?
- 29. 如何找到使用Octokit的GitHub仓库提交数量?
- 30. Git仓库提交
你可以链接该存储库吗? –
用存储库更新了问题。 – mythereal
似乎是更适合GitHub支持的问题,比SO –