34

I would like to show a client my contribution history towards a project, without making the repo public. Is there a way to do this through github (eg: not taking screenshots of everything).

Ideally they could see at least the number of contributions towards the project; it would be great if they could also see the graph features (punch card, timeline, etc.).

Is this possible?

Joker
  • 2,119
  • 4
  • 27
  • 38
  • Given how github pulls from git and given how easy it is to manipulate git history, you really can't get an objective view if the client can't see the project repo – SheetJS Jun 16 '13 at 22:43

3 Answers3

36

I created a script that solves this problem:

https://github.com/ebrian/gitdummy

It will transfer all of your commit messages and dates for a given email address out of an existing repo and into a dummy repo that you can then push up to your GitHub account. It won't transfer source code, project names, or project team members' commits.

Enjoy.

brian
  • 2,745
  • 2
  • 17
  • 33
  • Is there a way this can be used for a 'dummy' repo that DOES exist, so it can be modified to just run at the end of the day or week and continually update the commit count? – Jared Oct 15 '14 at 18:47
  • This is the most asked feature and something I am working on, but, no, not currently. – brian Oct 15 '14 at 21:53
  • @brian I am impressed at your work :-) I followed the instructions and have a dummy repo folder containing multiple txt files named 'commit0000x.txt'. Then, how can I add them publicly to my gitHub account? Any help would be appreciated! – user1885433 Oct 27 '14 at 01:18
  • 1
    @user1885433 Create repo-x on GitHub then `git push https://github.com/you/repo-x master` – brian Oct 27 '14 at 05:19
  • @brian Actually, it magically worked for one repo, but didn't work for another repo unfortunately. After answering questions, I got this: "Traceback (most recent call last): File "./gitdummy/gitdummy.py", line 46, in commit_line = line_re.search(line).groups() AttributeError: 'NoneType' object has no attribute 'groups'" – user1885433 Oct 29 '14 at 07:26
  • 2
    @Jared I added that feature you asked about earlier. GitDummy now uses a json of repos and you can run it over and over as needed. – brian Nov 23 '14 at 05:42
  • @diegopau You bet. Glad you're enjoying the project! – brian May 26 '15 at 12:53
  • 1
    This is still super useful and relevant now even when GitHub counts contributions from private repos. For example, I can now use this to transfer my contributions in Enterprise to my personal GitHub! Three cheers for `gitdummy`! – Sibbs Gambling Apr 21 '17 at 14:43
24

EDIT You can now show private contributions on your GitHub profile page.

https://help.github.com/articles/viewing-contributions-on-your-profile-page/


No, this is not supported through the GitHub website, unless you want to create an "organization" and give the client read-only access to the whole repo.

Clone the repo locally and use the git log command to dump the project history to a text file. You can then give the client this text file. This won't give you GitHub's visualizations, but you could make some of your own in Excel or some other program.

sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
  • 5
    -1: while it does show the history, how do you establish that it wasn't something you manipulated? – SheetJS Jun 16 '13 at 22:44
  • 13
    +1: while this isn't the answer you wanted, it is still correct. You should only vote down answers if they're wrong. – Software Engineer Jun 16 '13 at 22:57
  • 1
    There should be no incentive to answer a question if it has already been answered accurately. There is no way to achieve what you want. – Software Engineer Jun 16 '13 at 23:07
  • 1
    @EngineerDollery read the original response. He came to the opposite conclusion, then I made my comment and he edited the response – SheetJS Jun 16 '13 at 23:08
  • 3
    +1 this is a correct answer to the question.. Manipulation is not mentioned in the question at all.. So no reason to down vote.. 1+1=2 is true but does not answer the question.. – mariux Jun 16 '13 at 23:13
  • Meh, just give it a few more weeks and I'm **sure** the Not-Constructive-Question Gestapo will soon close this one down :-/ – Theodore R. Smith Jun 23 '14 at 19:08
  • 1
    This answer has become invalid as @becca-petrin points out in her answer it is possible now http://stackoverflow.com/a/37335099/1166161 – Patrik Affentranger May 20 '16 at 03:55
19

It's possible now!

  • Go to your profile page
  • Under "Contributions settings", open the dropdown
  • Choose "Public and private contributions"
Becca Petrin
  • 1,494
  • 14
  • 13