Reputation: 803
I noticed that a GitHub repository has zero contributors with obvious commits. How is this possible?
Upvotes: 2
Views: 229
Reputation: 113455
The committer email is not associated with any GitHub account. By picking a random commit, add adding the .patch
suffix you can see this:
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
...
The [email protected]
is probably not associated with any GitHub account.
You can create such a repository following these steps:
# 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
Then on the Github repo page you will see:
Clicking on the commit url and adding the .patch
suffix (to get the raw information):
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
Upvotes: 2