How to keep Email on GitHub private, but still make contributions visible? - email

I have an email which linked to GitHub account and I don't want it to be visible for people. So I set it private like this:
Having this configuration you cannot push changes with your email set in git.
If you set any other string as git email, it will be performed, but in contributions block there will be no contributions visible.
How to keep Email on GitHub private, but still make contributions visible?

If you look in Keep my email address private line, you will see this comment:
We’ll remove your public profile email and use
25605156+yourgithubid#users.noreply.github.com when performing
web-based Git operations and sending email on your behalf.
So if you attach this generated email to your git, changes will be pushed successfully, and you'll see your commits in contribution board.

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.

Github transfer contributions from one account to another

I have googled it a lot but didn't find any clear answer if it possible and how to do it.
I have an account from which I have contributions to a private repo. I don't have any repositories.
I want all those contributions to go to my new account (There I have repositories).
Is that possible? Do I still have access to that private repo after transfer the contributions?
You would need to rewrite commits which would create new hashes (the committer's name is part of the data used to calculate the hash).
This would mean all commits that reference these commits (the parent commits also being part of the data used to calculate the hash) would also need to be regenerated (rebase allows this to be done in bulk).
All of this would require forcing pushes as well (so all other contributor's local repositories are going to be impacted).
Even if github can automate some of this, it is a massive impact.
TL;DR: yes, but you probably should accept it is hard to rewrite history.
Guessing from the tags I assume you're talking about GitHub accounts. GitHub calculates contributions based on the author email address used in Git commits, and if there is a GitHub account that uses this email address, your GitHub user name shows up as a contributor. That said, you can associate multiple email addresses with a single GitHub account. So if you unregister your current email address from your old GitHub account, and register the same email address for your new GitHub account, existing contributions will show under your new GitHub account.
Do I still have access to that private repo after transfer the contributions?
That's a totally different question, and the answer depends on whether your new GitHub account was given access to the private repository. The GitHub permissions system is based on the GitHub user name, not on registered email addresses.

Pycharm commits to github not shown in my github history

When using username/password combo to commit to my Github account via Pycharm, I don't get green squares (badges) in my Github commit history. Commits are made to my own public repository
This is not that big technological issue but there are people who judge others based on number of those green squares.
Make sure that the email address that you use in your commits matches the email address of your github account. To change the email address, use git config user.email (see here for more information).

Can I associate a GitHub user with his commits by name only, BitBucket-style?

I've seen Github shows name instead of a linked username in commits and I realise that the right thing to do is to link by email. However, I already have a repository with a whole bunch of commits whose email is "none#none".
On BitBucket, I can specify a per-project mapping of committer name to BitBucket account, and this has worked well enough. Is there anything like this on GitHub?
If not, what other options are there, short of leaving the commits unlinked and rewriting the entire history?
You can use .mailmap file in your repo, for mail aliased (as stated in "“Alias” git authors/committers?")
You also can add another email in your Email setting account.
But both solutions don't scale well when several authors use the same none#none email.

How to get notified when someone pushes into a GitHub branch?

We're are using GitHub Enterprise in our company. We have a “develop” branch where every programmer must push their work. Is there a way to get notified when someone pushes into the develop branch along with a link to a diff view, like the one you get for a pull request?
Not quite - but close enough. (You'll get notified for every commit, not push.)
For GitHub Enterprise as of mid 2014:
Go into your repository's Settings
Open the "Webhooks and Services" tab
Click "Add Service" button
Select "Email" from the long list of services
Put in an e-mail address. This can be an e-mail address that forwards to multiple e-mail addresses, or just your own if only one person/account needs e-mail notifications.
Check "Send From Author" (probably) and "Active" (definitely).
For older versions of GitHub Enterprise:
Go into your repository's Settings
Open the "Service Hooks" tab
Select "Email" from the long list of services
Put in an e-mail address. This can be an e-mail address that forwards to multiple e-mail addresses, or just your own if only one person/account needs e-mail notifications.
Check "Send From Author" (probably) and "Active" (definitely).
Done!
Update GitHub plans on shutting down GitHub services before the end of the year. Refer
How about using IFTT or Zapier
Disclaimer: I'm the original author.
This project allows you to get an e-mail when a commit gets pushed on a repository you are watching (on any branch).
Explaination: gicowa is a command-line tool written in python that lists all last commits on all GitHub repos you are watching. This tool can send its output via e-mail and can be called from your crontab. Doing that makes you receive an e-mail notification each time a commit gets pushed on a GitHub repo you are watching.