Merging GitHub accounts - contributions and stats - github

I want to merge my two GitHub accounts (meaning transferring repositories ownership to one account, and deleting the other, according to https://help.github.com/articles/transferring-a-repository/). Do my other account will inherit the contributions number (and therefore contribution graph and activity overview) from my old account? In other words, what determines the number of contributions in a GitHub account: is it when the email address of the commit correspond to one of the email adresses associated with my GitHub account?
I have read Merging two github accounts but it doesn't answer the number of contributions question.

Transferred repos will inherit issues, pull request, contribution history, stars, watches.
The contribution history is a different story, and how it's calculated is explained here: https://help.github.com/articles/viewing-contributions-on-your-profile/ To quote from there:
What counts as a contribution
On your profile page, certain actions
count as contributions:
Committing to a repository's default branch or gh-pages branch
Opening an issue
Proposing a pull request
Submitting a pull request review
Co-authoring commits in a repository's default branch or gh-pages
branch
Assume you have 2 users: A <a#gmail.com>, B <b#gmail.com> and you're merging B into A:
Events like "opening a PR", "opening an issue", "commenting on issue/PR", "making code review on a PR" which count as contribution on B's profile will be lost
Events like "commits" on the master branch will be added to A –if you add b#gmail.com as one of your emails in A’s account settings
when you transfer B's repos to A, and then delete account B.

Related

Merge two github accounts

Is it possible to merge two GitHub accounts into one?
I had one work account but would like to merge into a personal one.
I found some details about transferring ownership of the own repos which will merge all commit history etc.
Could anyone please confirm if it will transfer all commit history for any contributions made to another third party repos?
What will happen in the third party repos where I have made contributions from work account after the work account is deleted?
That is what describes "Merging multiple personal accounts"
And its repository transfer process (from the account you want to delete to the account you want to keep) should transfer issues, pull requests, and wikis.
You will need to add the email address you used to author the commits (of the old account) to the account you're keeping.
That way, your old contributions will be preserved.
I logged a support ticket with github and below is the summary:
After deleting work account and following steps as mentioned https://docs.github.com/en/repositories/creating-and-managing-repositories/transferring-a-repository did not bring contributions across to the personal account.
As work account was deleted - it started showing as a ghost account.
The commits made through work account were as from the personal acccount but contribution history (PR or any reviews) didn't come across to the personal account.
So make sure you think of above steps before removing any of your Github account.
Below were responses from Github:
As pull requests, issues and all activity in the GitHub web UI excluding commits are directly tied to the account that created them, they will not be counted on the new account even if you add the old account's email address to the new account.
Pull requests are replaced with the ghost user when the account is deleted. On the other hand, we read the email address from the metadata stored inside a commit and attempt to match commits up with a user account, so those that meet the contribution criteria will be counted on the new account.

Why am I not showing up as contributor in github?

Why my github commits are like this. Is this the reason that I am not showing up as a contributor.
If you don't appear in a repository's contributors graph, it may be because:
You aren't one of the top 100 contributors.
Your commits haven't been merged into the default branch.
The email address you used to author the commits isn't connected to your account on GitHub.
source

Github Anonymous Commit history

I have a github repo from a few years ago that had 247 commits and 5 contributors. However the majority of commits from one of those contributors wasn't from github, rather via a Git Bash CLI that I would push from more or less anonymously.
Problem:
The graph view in github is only showing the commits from registered Github users (only 4 shown) - so a total of 15 commits are being shown and the other 232 commits are missing.
I want to be able to view the commits in the Graph View as they include all of the commits (all 247) - including the ones I pushed anonymously.
# of Commits shown:
Only Commits by Registered Users:
I believe that Github calculates users based on email address.
So if you add that wildcats.unh.edu address to your user account on Github, those commits should be attributed to you.

Github - What happens with the commits if the user is removed?

If an user is removed, of course its repositories are removed and all the information contained too, what happens with the contributions to external repositories? Like commits in a organisation or into other users repositories.
Is any other activity history removed?
Commits in other repositories are not changed at all.
Commits are identified by author email address, as part of git itself.
If the author user is deleted, those commits will no longer link to an email address, but will not otherwise change.

github: Collaborators Can Merge Their Own Pull Requests

I have one collaborator in my private github repository. After she sent me a pull request, she could actually go to the pull request screen and executed a merge i.e. she had the privilege to merge her changes into my branch.
Is there some kind of setting that I need to set in order to make sure only I can do the merge? And, I don't think this is because my repo is private, right?
Thanks.
From 'https://help.github.com/articles/defining-the-mergeability-of-pull-requests/':
You can require pull requests to pass a set of checks before they can be merged. For example, you can block pull requests that don't pass status checks. You can also require that pull requests have at least one approved review before they can be merged.
By default, any pull request can be merged at any time, unless the head branch is in conflict with the base branch. But as your project matures and stabilizes, you can choose to enforce restrictions on how a pull request is merged into your repository.
Protected branches ensure that collaborators on your repository cannot make irrevocable changes to branches. These branches can also be protected by requiring pull requests to have at least one approved review before they can be merged.
You could use a service like PullApprove or required code reviews to ensure that you have to give permission first.
The "Manage multiple clients" GitHub help page mentions:
This approach lets you retain control over the repos, but still gives your clients access to them.
In many cases it is the cheapest route overall, though you will be stuck paying the bill yourself (unless you bill it to the client).
To use this strategy, upgrade your personal or org account to a paid plan.
Now you can add private repos for the client directly to this account.
If the client wishes to access the repos directly, they can create a free personal account and you can add that user as a collaborator (if the repos are on your personal account) or to a team (if the repos are on an org account).
With an org account you can also give them admin access to the repo if you wish.
So if your project was part of an org account instead of a personal account, you could have the choice the the admin access for the users you add as collaborator.