我注意到一个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 –