Replies: 4 comments 12 replies
-
I can't speak to the the why but there is a third option for how. That article lists two options for working around this limitation and explains why neither is ideal.
There is a third option, one that preserves commit history and allows contributions to be shown. And that is to manually create a non-fork repo and push to that as the origin. This is super easy with the So for example, I've forked https://github.com/norwd/should-you-have-some-coffee from https://github.com/marcospgp/should-you-have-some-coffee and made some commits that I want to show in my contributions. Right now that commit is not showing in my contributions graph, but if I clone the repo locally and rename the fork I can create a new repo that has the same name and origin as my fork but isn't treated as a fork by GitHub. gh repo clone norwd/should-you-have-some-coffee
cd should-you-have-some-coffee
gh repo rename should-you-have-some-coffee-fork --confirm
git remote rm origin
gh repo create should-you-have-some-coffee --public --source=. --remote=origin --push What this does is move the fork to a separate repo that stays as a fork (you can delete this manually later) then creates a new repo that has the same name as the original fork and pushes all your commits there instead. Now my contribution activity shows that commit I made earlier in that fork. I know that this isn't the same as GitHub adding a button to change a fork to a standalone repo without contacting support, but it's still super quick and easy 😄 |
Beta Was this translation helpful? Give feedback.
-
@joanaleoni Don't commits to my own personal repos count? By that logic, they shouldn't 🤔 I expected forks to act as any other repo. A fork is just a label, and there is a way to create an exactly equal repo without it, commits to which do count as contributions. |
Beta Was this translation helpful? Give feedback.
-
Hello, I too would love to have an option to show contributions (commit/issues/etc) into fork counted on my activity profile. In my case, I've taken over the maintenance of a project, I've forked it and worked on that fork since. I will never do a pull request on the parent repo, which is effectively dead, and I would prefer to keep the parent/fork link for historical purposes. Regards, |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Question
Body
As explained here: https://anuragbhandari.com/coding-tech/someone-should-fix-how-github-counts-contributions-1591/
Some forks are actual standalone repos, intended to be maintained separately from the parent repository, but periodically synced.
Beta Was this translation helpful? Give feedback.
All reactions