【问题标题】:My Git contributions aren't updated on my GitHub profile我的 Git 贡献没有在我的 GitHub 个人资料上更新
【发布时间】:2021-05-22 20:49:11
【问题描述】:

当我在一个新分支上时,我在更新我对 GitHub 的 git 贡献时遇到了问题,这不是主要分支。

简而言之,我有 2 个分支:main 和 magic-chat-app。当我在magic-chat-app 上进行提交时,它确实在我的个人资料中没有显示任何内容。但是当我在我的主分支上提交时,它确实出现了。

我已经验证了我的 user.name 和 user.email,它们是正确的。我没有分叉这个项目。

以下是链接:

https://github.com/WebDices/chat-application/tree/main

https://github.com/WebDices/chat-application/tree/magical-chat-app

https://github.com/WebDices

【问题讨论】:

  • 注意:git commitgit push不同!
  • 提交被推送到两个分支中。我添加了文件,提交了它们,最后我推送了。您可以在上面的链接中看到它。

标签: git github branch


【解决方案1】:

这是我看到的。

$ git clone git@github.com:WebDices/chat-application.git
Cloning into 'chat-application'...
remote: Enumerating objects: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 12 (delta 0), reused 9 (delta 0), pack-reused 0
Receiving objects: 100% (12/12), done.

$ cd chat-application/

$ git log
commit 85bee60d168759cd0b610850e2a77bce9e937dbb (HEAD -> main, origin/main, origin/HEAD)
Author: WebDices <webdices@gmail.com>
Date:   Fri Feb 19 22:32:38 2021 +0200

    commit test

commit 946e1a7fc87dea46cd741b4fdc99cdc5f1e099c4
Author: Alexandru Buruiană <53376915+WebDices@users.noreply.github.com>
Date:   Tue Feb 16 18:33:46 2021 +0200

    Initial commit

$ git checkout magical-chat-app
Branch 'magical-chat-app' set up to track remote branch 'magical-chat-app' from 'origin'.
Switched to a new branch 'magical-chat-app'

$ git log
commit 730d802cc46e8241cc831bd145265db7826a02ab (HEAD -> magical-chat-app, origin/magical-chat-app)
Author: WebDices <webdices@gmail.com>
Date:   Fri Feb 19 22:31:03 2021 +0200

    first commit

commit b3b4701501f21142636e05c1adbf1822fc34ceaf
Author: Alexandru Buruiana <webdices@gmail.com>
Date:   Fri Feb 19 22:26:30 2021 +0200

    first commit

commit 946e1a7fc87dea46cd741b4fdc99cdc5f1e099c4
Author: Alexandru Buruiană <53376915+WebDices@users.noreply.github.com>
Date:   Tue Feb 16 18:33:46 2021 +0200

    Initial commit

在我的个人资料上没有显示任何内容

不确定您在说什么“个人资料”。不管是什么,在 同步之前可能会有延迟?

【讨论】:

  • 在绿色方块上并没有显示所有的贡献。如果你看到最后一个绿色方块,它只显示了 1 个贡献(在主分支上),但它没有显示我在 magic-chat-app 分支上所做的事情。因为它不存在。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-10-14
  • 2018-01-24
  • 2019-02-07
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多