Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

Keep Github commit graph when leaving an organization #1138

Closed
liuben10 opened this issue Dec 5, 2017 · 50 comments
Closed

Keep Github commit graph when leaving an organization #1138

liuben10 opened this issue Dec 5, 2017 · 50 comments

Comments

@liuben10
Copy link

liuben10 commented Dec 5, 2017

Hi,

I was wondering if we could keep the github commit graph if we leave an organization? I worked really hard for an organization and had more than 2000 contributions for a particular repository and worked overtime many times. I left the company, and now I lost all the commit record on the commit graph. I felt since the commit graph didn't actually show the content of the commits it should be okay to keep the old graph since I was really proud of showcasing how hard I worked for the previous organization. Plus I think it would help recruiters who want to use the app to see how much people have contributed in general.

It's okay if this doesn't get fixed but I wanted to at least know what's wrong with having the commit graph show commits that you made to an organization that you are no longer part of.

Thanks in advance.

@oakis
Copy link

oakis commented Mar 9, 2018

I feel the same way, I just got 7 months worth of commits disappear from my graph. :(

@thinhvo0108
Copy link

Me too, my contribution for the whole last year just disappeared silently (& sadly as well ^^)

@marcoaam
Copy link

marcoaam commented Apr 6, 2018

I feel the same way. 3 and a half years of contributions gone :( . All email addresses are added to my account and I was always very careful to have my git config with the correct email to have my contributions added. It would be great to be able to keep them.

@LuisGV212
Copy link

Yea, especially with the "Job Profile" feature. It wouldn't make sense to use Github for evaluating anything other than open source contributions and personal projects, since as soon as you leave an employer, your commits are gone from view.

@BradStell
Copy link

I agree 100%. I've been coding for a company for the last 2 years, my commit graph looked amazing. I got a new job and now my commit graph looks like I've been dark for the last 2 years. NOT COOL

@cue232s
Copy link

cue232s commented Jul 6, 2018

Can we get some answers around this? I just lost over a year of commits after recently leaving a company. Does Github not see an issue with this? Has this already be explained elsewhere and I'm just not finding it?

@JohannaGomez
Copy link

Oh yes please, we need some answers

@oakis
Copy link

oakis commented Jul 11, 2018

Not only did I lose my commits from my last company, but at my new company we are using GitLab. Im screwed. xD

@lee-seul
Copy link

I have the same issue...

@nukec
Copy link

nukec commented Sep 4, 2018

so any news, anyone ever checked this?

@ahmsolo
Copy link

ahmsolo commented Oct 16, 2018

"We recommend starring any repositories you contribute to. That way, your commits to those repositories will remain in your contributions graph even if you leave the organization that owns the repository or delete your fork of the repository" from https://github.community/t5/Support-Protips/Getting-all-your-commits-in-your-contributions-graph/ba-p/19

@Saif03
Copy link

Saif03 commented Dec 14, 2018

Do read best practices for leaving your company
and Getting all your commits in your contributions graph

as also mentioned by @ahmsolo, following is true,

We recommend starring any repositories you contribute to. That way, your commits to those repositories will remain in your contributions graph even if you leave the organization that owns the repository or delete your fork of the repository.

@L-Lewis
Copy link

L-Lewis commented Jan 10, 2019

So does that mean it's too late to keep commit records from a previous employer's repository if we didn't know about this at the time so didn't star the repository before we left? That seems unfair.

@veryspry
Copy link

veryspry commented Jan 21, 2019

@L-Lewis I was able to surface my commit history on the commit graph by turning on private contributions under the Contribution Settings tab on the top right of the graph. Check out this help doc for a slightly more detailed walkthrough and screen shots. 🙂

@oakis
Copy link

oakis commented Jan 24, 2019

@veryspry It only shows a fraction of my commits to private repos.

@trcyshw
Copy link

trcyshw commented Jan 24, 2019

Same boat. Didn't star all of the repositories (wasn't aware of the necessity), now I've lost around 80% of the contributions that were on my graph.

@L-Lewis
Copy link

L-Lewis commented Jan 29, 2019

@veryspry thanks for the suggestion but unfortunately I've already tried that and it didn't make any difference.

@H-Gomez
Copy link

H-Gomez commented Feb 6, 2019

Not a solution as such, but for those aiming to leave soon it might be worth generating an image of your Github contributions history from this tool: https://github-contributions.now.sh/
(source: https://github.com/sallar/github-contributions-api)

Had to do this myself recently to protect against a freelance project which removed me from their organisation.

@jdunc
Copy link

jdunc commented Feb 8, 2019

Would be very helpful to restore the graph

@jimfilippou
Copy link

jimfilippou commented Feb 14, 2019

It is possible 🤓

If you still have the codebase locally, you can reinitialize the repository and upload it as a new private repository to your account. That way every contribution will count but I don’t recommend it since your company’s code is strictly confidential and will probably contain sensitive data which potentially belongs to customers. I believe every one of us has signed not to distribute or share projects that are not open-sourced, and we must respect that. The funny thing is that staring the repositories indeed keeps your contributions, so let your friends know that and not make the same mistake as us.

@alyosha
Copy link

alyosha commented Feb 22, 2019

Regarding the advice to star the repos before leaving, does this mean that only commits post-starring will remain? Or is starring once sufficient to retain all past commits?

@jimfilippou
Copy link

@alyosha93 all commits will remain, so star the repository as soon as you can just in case.

@MuddyBootsCode
Copy link

MuddyBootsCode commented Mar 1, 2019

It is possible 🤓

If you still have the codebase locally, you can reinitialize the repository and upload it as a new private repository to your account. That way every contribution will count but I don’t recommend it since your company’s code is strictly confidential and will probably contain sensitive data which potentially belongs to customers. I believe every one of us has signed not to distribute or share projects that are not open-sourced, and we must respect that. The funny thing is that staring the repositories indeed keeps your contributions, so let your friends know that and not make the same mistake as us.

Do you have some steps for this?
@jimfilippou

@TPS TPS added the bug label Mar 3, 2019
@jimfilippou
Copy link

  1. Create private repo
  2. Reinitialize git
  3. Change remote origin
  4. commit
  5. push

@jimfilippou
Copy link

@jimfilippou

What would happen if I momentarily regain access to the private repo( and star it) after I have been removed as a collaborator? Would this still reflect my old contributions in the commit history or would it start afresh?

Note: the email id is the still the same

I have not tried this, but I am pretty sure that you will get all contributions back as soon as you star the repository any time. If you can do this, do it

@HasanTechie
Copy link

It is possible

If you still have the codebase locally, you can reinitialize the repository and upload it as a new private repository to your account. That way every contribution will count but I don’t recommend it since your company’s code is strictly confidential and will probably contain sensitive data which potentially belongs to customers. I believe every one of us has signed not to distribute or share projects that are not open-sourced, and we must respect that. The funny thing is that staring the repositories indeed keeps your contributions, so let your friends know that and not make the same mistake as us.

This Works perfectly. Steps are :
-create new private repository.
-from your company's code do git remote rm origin
-then do git remote add origin git@github.com:<username>/<new-repository-name>.git
-then do git push -u origin master
-finally star the new repository.
-now your contributions are back
-make sure to secure your git account because this private repository contain your previous company's code.

@liuben10
Copy link
Author

liuben10 commented Oct 2, 2019

I haven't been checking this, but I think @hasanabbax 's fix is probably the best. I'll have to try it when I get the chance, but I'm going to close this issue.

@liuben10 liuben10 closed this as completed Oct 2, 2019
@gfmartinez
Copy link

gfmartinez commented Jan 2, 2020

UPDATE: This did work with the change of remote add origin as mentioned.
However, after talking with support, it took 4 days to migrate to the graph rather than the 24 hours they quote. Seems it is low priority data-wise, but it should show up eventually.
Thanks!


@hasanabbax This did not work for me, unfortunately. Any ideas?

Two things:

  1. The organization I was a contributor for was deleted before I could star any of the repos.
  2. I had to use git remote add origin https://github.com/user/repo.git as per https://help.github.com/en/github/using-git/adding-a-remote

When I pushed up the repo to my own private repo, it does show all of the commit history (4k+ commits). But the graph remains unaffected. I waited more than 24 hrs as well to be sure, and still nothing. I did try starring the repo as well.

Thanks in advance for any suggestions.

@kirbyfern
Copy link

kirbyfern commented Jan 26, 2020

I no longer have access to my old email and decided to delete it and now most of my contribution graph was gone all of a sudden. I was really careful at doing so, is there a solution for it?

@BL4NK0UT
Copy link

Well GitHub should fix this as this impose security issues such as people making new private repository with Organization's code just to save their contribution graph.

Also, I've tried starring private repos and leave that repo. Still commits from the graph vanished but when added back as a contributor, the graph showed my contributions again.

@yardenac
Copy link

What's the point of making people jump through hoops to get back the expected behavior? It should work right by default.

@kirbyfern
Copy link

So go to any commit and add .patch at the URL so you can see your old email then just include that email in the list at your account settings without verifying it.

@Allianzcortex
Copy link

Allianzcortex commented May 1, 2020

Just FYI :

Today is 2020.05.01. if ur still in the organization and star all repos you make contributions, then the commit history will still display in the graph even after you leave the org.

You can check my profile for more details. Im doing my 8-month coop from 2019.09-2020.04 and have left the organization, you can still see my private contributions in my commit graph.

image

@bobaekang
Copy link

I'm glad that I found this thread!

I just got most--if not all--of my activities back on my contribution graph by starring all repositories to which I contributed while working for my past employer. Apparently, this trick works even if you star the repos after you leave the organization.

@OmarVector
Copy link

I tried to those steps but it didnt work:

  • Create a private Respo
  • Make a test commit
  • Star the Repo
  • Transfer the owner ship of the Repo to test profile
  • Make the test profile remove your main account from the repo
  • Observe

The commit history about this repo is removed from my graph, but once I added myself once again it shown back.

Is there any solution that I can transfer the ownership of any repo but at the sametime I can still maintain the commit history without making another private Repos?

@y0mbo
Copy link

y0mbo commented Jul 16, 2020

I starred all the repos and still lost the contributions.

@jimfilippou
Copy link

jimfilippou commented Jul 16, 2020 via email

@chinglamchoi
Copy link

Hi! Similar problem here: organisation removed ppl by mistake and the repo which I contributed to has been deleted... Does anyone know of any solutions?

@weibeu
Copy link

weibeu commented Jul 23, 2020

Please GitHub. I don't want to loose any contributions I made. For which I actually gave my time to. It just makes no sense in the way they're gone.

@dongho-jung
Copy link

dongho-jung commented Sep 2, 2020

why is this closed? the problem isn't solved at all.

I follow the rule from here

The email address used for the commits is associated with your GitHub account? YES
The commits were made in a standalone repository, not a fork? YES
The commits were made In the repository's default branch? YES

AND I HAVE STARRED THE REPO YES I HAVE STARRED THE REPO

AND?

I still lost the contributions and there's no more solutions here

@Zenahr
Copy link

Zenahr commented Sep 7, 2020

This is still a hot topic so why close it?
At least add a closing comment so we know what happened to it.

@sananand007
Copy link

How come this is closed?
I got out of my org, left the company all my commit-graph is totally gone, ok I understand I may not access the commits after the org link is gone, but just have the count of the graphs in there, and reflect it, no links needed. Each and every company needs a GitHub link now, and it is really really sad and embarrassing, that GitHub is unable to do this much in 3 years timeframe being a well-funded org.

@thesofakillers
Copy link

It sucks that you have to star the repo to make it count. I hadn't starred a repo to which I was the main contributor before leaving the org, and now all my commits are gone from my contribution graph.

The starring of the repo is an unnecessary, redundant step.

@jimfilippou
Copy link

jimfilippou commented Dec 23, 2020 via email

@heanzyzabala
Copy link

Additionally, what if you're using your company email in your commits and then you leave. What will happen to your private contributions given that you starred the repo?

@bokub
Copy link

bokub commented Feb 9, 2021

In the Github documentation, they say:

In addition, at least one of the following must be true:

  • You are a collaborator on the repository or are a member of the organization that owns the repository.
  • You have forked the repository.
  • You have opened a pull request or issue in the repository.
  • You have starred the repository.

Which means you don't need to star the repository if you have opened a PR or an issue.

Can anyone confirm this?

@ashutoshgngwr
Copy link

From Best practices for leaving your company:

  1. Unverify your company email address by deleting it in your Email settings. You can then re-add it without verifying to keep any associated commits linked to your account.
  2. Change your primary email address from your company email to your personal email.
  3. Verify your new primary email address.
  4. Change your GitHub username to remove any references to your company or organization, if necessary.

I didn't star any of the organisation repositories before leaving and I had created PRs and Issues on all of them.

I have all my contributions showing up on the commit-graph. I am not sure what happens if the company decides to delete the repositories and/or move out their code from GitHub.

@ShepSims
Copy link

ShepSims commented Jul 2, 2021

I'm a project manager and am getting heat from an employee who we recently let go because despite having starred the repo, his contribution graph for the last year has just been cleaned out. Has anyone found a valid solution for fixing this yet?

@ashutoshgngwr
Copy link

@ShepSims If commits were made using a company email, they can remove that email and re-add it without verification to keep the associated commit history.

https://docs.github.com/en/github/setting-up-and-managing-your-github-user-account/managing-user-account-settings/best-practices-for-leaving-your-company

Unverify your company email address by deleting it in your Email settings. You can then re-add it without verifying to keep any associated commits linked to your account.

@smemsh
Copy link

smemsh commented Jul 4, 2021

@ShepSims Even if one configures the former work address as a secondary email in one's private account, having stars alone is not enough to count the commits if the repositories are private. GitHub support told me this was because "stars don't persist after leaving an org," which is dubious, since I rejoined my org temporarily and the exact same repositories I had starred were still starred.

However, if you have at least one issue or PR entered under the personal address, then all commits under the secondary email will be counted. I was able to re-join the org temporarily after leaving (thanks to good grace of my employer) and add a dummy issue to each repo, and then after being removed again, all my commits from the secondary email were counted in the graph of my personal account.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests