Contribution number is screwed through manual merging instead of github merge #184242
Replies: 4 comments
-
|
using proper branching would have prevented this entirely. There is a way to rewrite Git history to fix authorship, but it requires force-pushing and everyone recloning the repo, and it’s risky I know this situation sucks but I think this is the cleanest way forward |
Beta Was this translation helpful? Give feedback.
-
|
This is because the contributions are credited based on commit authorship, not who wrote the code. When your teammate merged manually GitHub recorded him as the author of those commits, so all the added/changed lines were attributed to his account. Unfortunately, GitHub does not allow reassigning contribution counts, so the lost contributions can’t be restored. The only way is to use proper GitHub merges (pull requests) and ensure everyone commits with their own GitHub-linked email so contributions are credited correctly next time. Hope this helps you! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for posting in the GitHub Community, @sjun-cyber! We're happy you're here. You are more likely to get a useful response if you are posting your question in the applicable category, the Discussions category is solely related to conversations around the GitHub product Discussions. This question should be in the |
Beta Was this translation helpful? Give feedback.
-
|
This is expected behavior on GitHub, and it happens because contributions are counted based on who authored the commits, not on how the work was shared in a group. Since one person manually merged the changes and committed them, GitHub recorded that person as the author, so all the contributions were credited to them. This is why commits like 9d33250 and 8ef067d show large contribution counts for that individual, while the others did not see any increase. Unfortunately, GitHub does not allow contribution counts to be reassigned or recovered after commits are pushed, even if the work was done collaboratively. Once the commit history exists, the contribution data is final. In theory, rewriting the commit history to fix author information could change this, but it is generally not recommended because it rewrites history and can cause issues for others using the repository. Going forward, the best approach is for each contributor to commit using their own account and to use pull requests instead of manual merging, so contributions are tracked correctly. I hope this helps clarify what happened for you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Discussion Type
Bug
Discussion Content
we work in group of 3, and one person is in charge of merging manually instead of using merge, he thought it wouldnt affect the contribution score but it absolutely did, and when he tried to fix it it only added more numbers to his contrubution whilst both of our contribution number did not change. There are insane increases in certain commits such as commit 9d33250 and commit 8ef067d where github decides to count everything to him for some reason. How do we get our contribution back
heres the link to the github
Beta Was this translation helpful? Give feedback.
All reactions