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

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.

Related

Why am I able to push and send/receive pull requests but not on the contributor list in github?

I'm been working in a team of four. I'm in the collaborator list. I'm able to commit, push, send pull requests and merge in our repo. My teammates can see my changes, but everyone is on the contributor list except me.
I double checked my email address, make sure the email I used in my local setting is the same with my default email in the github account.
We have changed the owner of the project once, and I'm still using the old url. Is this the reason for that?
I found the github has a complex rule for you be considered as a contributor. Here's the doc of it.
https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/managing-contribution-settings-on-your-profile/why-are-my-contributions-not-showing-up-on-my-profile
You have to commit to the main/default branch or make pull requests. To commit into other branches won't count.
Also, to use the old project url is definately one problem. In the project insight, everyone's profile is linked with their username. While mine is only a username with no user icon.
I think I just accidentally hit into one of the corner cases, but I'm still very confused of this design pattern.

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

Do you lose contributions of a project if you get removed from this project?

I can't seemed to find this information anywhere, but just wanna ask that if you are a contributor of a project and you worked on it so you can see all of those contributions on the chart, but then for whatever reason the owner of the project removed you, do you lose all of those contributions? as in will those green contribution grids(the days you work on it) go back to grey?
No, the contributions are based on the commit email ID, and do not have anything to do with the corresponding GitHub account having access to the repository. GitHub attributes a commit to a particular account if the email ID used with the commit is registered under that account.
So, unless the email IDs of past commits are in some way changed later, the contributions will still be visible, as long as the repository is public.
This also works the other way around. Anyone can set any email ID in their git configuration while committing, so it is trivial to falsely attribute commits to someone else, when viewing the contribution chart in GitHub.

Would forked repository be removed from blocked github user?

Is there any way to remove forked repository from github? This happens because there is no email provided by the github user who fork a repository. If I block the user, would that forked repository be removed from his account? Thanks.
According to the documentation:
When you block a user:
The user stops following you
The user stops watching your repositories
The user's stars and issue assignments are removed from your repositories
The user is removed as a collaborator on your repositories
You're removed as a collaborator on their repositories
Their sponsorship of you is cancelled
After you've blocked a user, they cannot:
Send you any notifications, including by #mentioning your username
Follow you or see your content in their activity feed
Invite you as a collaborator on their repositories
Invite you as a collaborator on a security advisory
Cross-reference your repositories in comments
Fork, watch, or star your repositories
Sponsor you
In repositories you own, blocked users also cannot:
Open issues or send pull requests
Comment on issues, pull requests, or commits
Add or edit wiki pages
To answer your question, the already forked repositories will remain on the blocked user account.

Merging GitHub accounts - contributions and stats

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.