git GitHub 提交未记录在“您的贡献”日历中
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15289768/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GitHub commits aren't recorded in the 'Your Contributions` calendar
提问by Roey Angel
I've been making continuous commits to my GitHub
repos from my linux shell and they show up nicely on the website just as they should. The only problem is that "Your Contributions" section doesn't show any recent activity. I have one green square from some day in November which I don't know how I got but all the other contributions don't show up in the calendar (but again, they doshow up in their repos.
What am I missing here?
我一直在GitHub
从我的 linux shell对我的repos进行持续的提交,并且他们应该很好地显示在网站上。唯一的问题是“您的贡献”部分没有显示任何最近的活动。我在 11 月的某一天有一个绿色方块,我不知道我是怎么得到的,但所有其他贡献都没有出现在日历中(但同样,它们确实出现在他们的回购中。
我在这里错过了什么?
采纳答案by Nevik Rehnel
This is a Github issue where sometimes their update mechanisms don't work and it turns into a "stale cache". This is nothing serious, simply send an email to [email protected] describing the issue and they'll fix it right away.
这是一个 Github 问题,有时他们的更新机制不起作用,它变成了“陈旧的缓存”。这并不严重,只需发送电子邮件至 [email protected] 描述问题,他们就会立即解决。
回答by Jonathan Chad Faling
from git
来自 git
I've just had a peek at your contributions for the GoTime2 repository and it seems that you've been pushing commits to the layout branch.
The reason why those contributions are not showing up is that we only track commit contributions when they are made to the repository's default branch or gh-pages branch:
Once your contributions are merged into the default or gh-pages, you will get credited for them on the date you authored them.
我刚刚查看了您对 GoTime2 存储库的贡献,似乎您一直在将提交推送到布局分支。
这些贡献没有出现的原因是我们只跟踪对存储库的默认分支或 gh-pages 分支进行的提交贡献:
一旦您的贡献被合并到默认页面或 gh-pages 中,您将在您创作它们的日期获得它们的信用。
so in my case I had to merge my 'layout' branch with the 'master' branch to see the 'your contributions' show up in the calendar.
所以在我的情况下,我必须将我的“布局”分支与“主”分支合并,才能看到“你的贡献”出现在日历中。
回答by turtlemonvh
For me this problem was caused by me committing from my work computer where I was using a different email in my gitconfig. Adding my work email address to my github account didn't make the past commits show up in the summary, but new commits are now showing up as they should.
对我来说,这个问题是由于我从我的工作计算机上提交的,我在 gitconfig 中使用了不同的电子邮件。将我的工作电子邮件地址添加到我的 github 帐户并没有使过去的提交显示在摘要中,但新的提交现在按原样显示。
You can find the email address you are using for a repository with git config user.email
.
您可以通过 找到您用于存储库的电子邮件地址git config user.email
。
回答by haventchecked
A possible cause for this:
一个可能的原因:
Commit was made in a fork
Commits made in a fork will not count toward your contributions.
提交是在一个叉子中完成的
在分叉中进行的提交不会计入您的贡献。
https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
回答by Tyler Morgan
This did the trick! I just used $ git config user.email "my email address used on my git repo"
and it worked.
这成功了!我刚用过$ git config user.email "my email address used on my git repo"
,效果很好。
回答by Vishwanath gowda k
"You have to commit the changes with the same email id you used to login to your github account"
“您必须使用用于登录 github 帐户的相同电子邮件 ID 提交更改”
How to solve:
怎么解决:
- Change global email id for all repositories using following command.
- 使用以下命令更改所有存储库的全局电子邮件 ID。
git config --global user.email [email protected]
git config --global user.email [email protected]
- Or Change email id for one particular repository. From inside the particlar repository run below command
- 或更改一个特定存储库的电子邮件 ID。从特定存储库内部运行以下命令
git config user.email [email protected]
git 配置 user.email [email protected]
- Or in the repository open .git/config file and edit
- 或者在存储库中打开 .git/config 文件并编辑
email = [email protected] name = abc
电子邮件 = [email protected] 名称 = abc
other causes can be found here https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
其他原因可以在这里找到 https://help.github.com/articles/why-are-my-contributions-not-showing-up-on-my-profile/
回答by drjorgepolanco
Make sure your local email is the exact same that the one in the account.
确保您的本地电子邮件与帐户中的电子邮件完全相同。
Go to the terminal and inside the folder you are pushing the commits, run:
转到终端并在您推送提交的文件夹内,运行:
git config --global user.email
#=> [email protected]
git config --system user.email
#=>
git config --local user.email
#=> [email protected]
Something similar was happening to me. The email in my account was the one in the --global, but my --local was slightly different, it had not '.'.
类似的事情发生在我身上。我帐户中的电子邮件是 --global 中的电子邮件,但我的 --local 略有不同,它没有“.”。
(In Gmail there is no difference between those emails, they work the exact same).
(在 Gmail 中,这些电子邮件之间没有区别,它们的工作方式完全相同)。
回答by geekidharsh
so this usually happens due to a lot of factors, for which you must visit this GitHub help
所以这通常是由很多因素造成的,你必须访问这个GitHub 帮助
The most common mistakes I found were :
我发现的最常见的错误是:
- Email not configured properly on local machine. (your laptop/pc).
- Forking.
- Not using default or gh-pages branch for commit.
- 未在本地计算机上正确配置电子邮件。(您的笔记本电脑/个人电脑)。
- 分叉。
- 不使用 default 或 gh-pages 分支进行提交。
I personally had issue 1 recently, for which I went to my terminal/cmd/cliand configure my email address locally by running this command
我个人最近遇到了问题 1,为此我转到我的终端/cmd/cli并通过运行此命令在本地配置我的电子邮件地址
git config --global user.email [email protected]
Once that's done, try running this config again like this:
完成后,尝试再次运行此配置,如下所示:
git config --global user.email
You should be able to see:
您应该能够看到:
[email protected]
If this was correct, you have successfully configured your local machine with your global public repo. Now your next commit will be credited towards your calendar.
如果这是正确的,则您已使用全局公共存储库成功配置了本地计算机。现在您的下一次提交将记入您的日历。
回答by Guohua
Maybe Github had fixed this problem. There is one simple way, go to github.com email setting: https://github.com/settings/emails
也许 Github 已经解决了这个问题。有一个简单的方法,去github.com邮箱设置:https: //github.com/settings/emails
Personal settings --> Emails
个人设置 --> 电子邮件
You can add email address there, and verify your newer email address with send a verification link, then you will find your previous commits are all recorded in the 'Your Contributions` calendar.And this email verification will also let you receive notifications and password resets from GitHub.
您可以在那里添加电子邮件地址,并通过发送验证链接来验证您的新电子邮件地址,然后您会发现您以前的提交都记录在“您的贡献”日历中。此电子邮件验证还将让您收到来自 GitHub 的通知和密码重置。
Your new email address will be used for account-related notifications (e.g. account changes and billing receipts) as well as any web-based GitHub operations (e.g. edits and merges).
您的新电子邮件地址将用于与帐户相关的通知(例如帐户更改和账单收据)以及任何基于 Web 的 GitHub 操作(例如编辑和合并)。
回答by Cons Bulaquena
I had the same issue in Xcode 9 for iOS development.
我在用于 iOS 开发的 Xcode 9 中遇到了同样的问题。
In Github, I noticed a non-committer author.
Even though I made commits in Xcode. There was no contributions in the 'Your Contributions` Calendar.
即使我在 Xcode 中进行了提交。“您的贡献”日历中没有任何贡献。
Solution:
解决方案:
Change Committer Name and Email Globally
The email address used for the commits must be associated with your GitHub account.
全局更改提交者名称和电子邮件
用于提交的电子邮件地址必须与您的 GitHub 帐户相关联。
In the Terminal:
在终端:
$ git config --global user.name "Full Name"
$ git config --global user.email "[email protected]"
See also GitHub Help: Setting your commit email address in Git
另请参阅 GitHub 帮助:在 Git 中设置您的提交电子邮件地址