Github contributions not showing up on profile graph? - github

I have done my research and tried to diagnose the issue myself, but cannot find the answer. I have been contributing on a consistent basis to a repo for the company that I work for and I don't see any of my contributions and I have all my settings set to display public and private contributions.
The only thing I can think of is, since I am creating separate branches and then not merging the branch to master the reason behind my contributions not showing up on my profile? Only on the branch of the repo itself are my contributions being shown when I view the repo on github.
It would be very much appreciated if I could get a thorough understanding of this as I am very confused.

Commits to branches other than master (or whatever your default branch is named) do not appear on the contribution graph until the branch is merged.
See: Contributions That Are Counted

Issue resolved, was originally under a commit email address from past employment. Used git config --global user.email "email#mail.com" to resolve the issue.

Related

Github private repository master branch protection

we had an incident one of our devs merged into master branch directly which shouldn't have happened.
We use "feature" branch that goes in "rc" branch directly - which will be QA'ed then merged into "master" after deployment.
I'd like to see if there is a way to restrict only "rc" branches can be merged into master and reject all other push.
Since we are using private repo, branch protection via github setting might not work, so I was looking into pre push hook, but will above scenario be possible?
Thank you.
looked into github setting -> branch protection : it wasn't available for private repo
looked into usage for pre push hook.. wasn't able to find good example for our usage so far.
According to the GitHub docs, you'll need at least GitHub Pro to create branch protection rules with a private repo.
There are other ways to do it, but based on how much time they'll take and what a pain they'll be to deal with, $4/month for pro is almost certainly the easiest way IMO.

Commit does not enter the contribution graph

I recently made several commits, but they are not being counted, they all follow the patterns they were giving in the past, but recently they are simply not going to the chart anymore, could you help me?
Was there any update that removed this benefit from free users?
https://github.com/Peedrooo
In order for a commit to be counted in the contribution graph, it must have been merged into the default branch in the main repository. Commits in forks or in branches other than the default branch don't count.
Additionally, if it's in a private repository, you must enable the option for those to appear in your profile.
GitHub provides documentation on how to troubleshoot this.

How to show repos I collaborated to on my personal Github page?

I've worked on a project with a friend and we've used Github, but she is the owner of the repository, and I would like to have this repo on my Github profile too.
yes, I am a contributor of the repo, and,
yes, I've done lot of commits.
Google is not helping me, I have only found an old question about this topic (here) but I do not find the button they are talking about:
sceenshot of what I see when clicking "customize your pins"
Any clue ?
Ensure on your profile settings you have checked the contributions section (it's below).
Also, you might be contributing to a branch so maybe the contributions will reflect after your friend merges the branch to the default branch

How does squashing, rebasing, reset --soft affect github contributions page?

For some projects I do or work on sometimes it is usually best that we squash/rebase all changes into a single commit. However, I was wondering how this affects the contributions page on github.
For example, if I spent 2 months pushing changes to a project I created and then after 2 months decided to rebase it to one single commit, would github remove all the contribution cubes on the map for the past two months?
I saw this still here so I figured I might as well answer the question. So the answer is YES. It will remove the contributions from the graph. It won't do it right away because commits that are no longer being pointed to by anything can technically still be reached for awhile but are eventually garbage collected and thus removed from your contributions page.
The reference page is "Why are my contributions not showing up on my profile?"
Commits will appear on your contributions graph if they meet all of the following conditions:
The email address used for the commits is associated with your GitHub account.
The commits were made in a standalone repository, not a fork.
The commits were made:
In the repository's default branch (usually master)
So if your rebase affect commits in master, chances are your contribution page would reflect that.

How do I use collaboration on GitHub? So others can put their code without having access to the master branch?

I am looking to collaborate with another person, but not able to figure out how GitHub works. I have a private repository, and I have added him as a collaborator, but now what?
Does he have to create a branch to which he will work separately?
How will the merge take place?
How will the merge take place? Who can merge the code?
PS - I saw the Stack Overflow question Do collaborators have commit access on GitHub? and looked at https://github.com/account/organizations/new, so basically unless I pay $25/month, can't I have someone not see the whole Master branch code?
If you add your colleague as a collaborator to your repo (no need for organization), he will be able to push to your repo.
But he will push whatever he wants in any branch.
Unless he is pushing in his dedicated branch, that can be dangerous.
The other option is to ask him to fork your repo.
See "What is the difference between origin and upstream in github".
By using pull requests, your colleague will ask for you to merge specific commits he wants to be taken into account.
But he will have his own GitHub repo to push to, which means he can push (or break) anything he wants.