Make private repo contribution history public - github

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?

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.

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.

It's possible now!
Go to your profile page
Under "Contributions settings", open the dropdown
Choose "Public and private contributions"

Related

Share PR comments with team outside of organisation

We have a team outside of our organisation that is writing firmware for us. They have an internal source control that we do not have access to. They share code with us by sharing a zip file with a .git inside it and we recreate the repo in our internal source control.
We want to conduct an overall code review. This will likely take some back and forth, multiple comments on multiple lines and files of code.
Is there a way to comment internally in our source control, then share these comments to a zip file with this external team? Or is the only way to do this, by creating another source control that is shared between us and the external team?
Create a GitLab account
Add them to your organization as a developer
Create a repository
Have them add that repository as a "remote" to theirs, so that when they push, their commits also go to that GitLab repository.
Then, do your collaboration via GitLab. It has a decent interface for creating Pull/Merge Requests, adding comments to code, and accepting them.

Show commits and description but hide code in repository [Github]

I've almost done my first big project in React+Typescript+Redux and started it on Firebase with users and some database conneted with logged users.
It was supposed to be my project to portfolio before looking for my first dev job, but it start to be very complex.
Now I have idea to use it in the future to make commercial app.
So the problem is I don't want to publish my code on github, but at the same time I want to publish all my commits and repository description on Github for recrutiers (and all my tasks from trello table). Is it possible to publish only commits and description from github repository?
No, this is not possible. If your repository is public, anyone can clone the entire repository. The only way to make your code inaccessible is to make the repository private, which means nobody can see it without having permssion.

Changing git account on Xcode

What I am trying to do is, I have a project that I got from someone on GitHub a little while ago. I just created my own GitHub account and wanted to link this app to my GitHub account so that I can use repositories and commit and push, etc. However in this app in the Xcode project in source control where it shows the master and history etc. it shows the name of the person who created the app originally and gave it to me. What I would like to do is to be able to link it to my account also so that when I commit something, he can't see it on his GitHub. I have already created a new repository on GitHub and have tried it out with a test app that I just made and it says my name under the source control side panel. I am not sure where to add a new remote and delete his for this project. I want to be able to commit and have it all set up on my account, so that he can't see my commits, etc.
What I have been doing before setting up GitHub was constantly duplicating the Xcode project whenever I wanted to add a new feature or edit something. I'm hoping this will help cut that step out?
If having the original owner not see your new contributions to the code is important to you, then you could simply clone the new repository that you created on GitHub and copy the code from his repository into your new one manually.
If you do not mind your code being linked to his original code, you can fork the repository on GitHub and then clone it and begin working from there.
Doing either of these methods will give you the same situation that you had with your test app, your name and information will show up in xcode, and you will be able to make changes to the repos.

Link private github repository to potential employer

I have some private github repos that contains the work that I am most proud of. I would like potential employers to see this code. Is it possible for me to give them a link to the private repository so they can view my work?
You could either:
create a private repo in bitbucket and push your project there, then send an invitation to employers' emails
add potential employers as collaborators to your private Github repo.
On the main repo's page, go to the "Settings" tab
On the nav links to the right, "Collaborators"
I'd recommend against zipping the project and sending them the whole thing, as they'd either not see the git history, or see your entire git configuration, depending on how you zip the folder... And I think seeing how a developer works with git is important in addition to seeing the code itself...
There are few option for you:
If you have private repositary on your machine, then public into bitbucket or github and making private repo.
If you have private repositary online you can invite them to the repositary and give them privilages that you want to.
Make latest backup of your repositary and send it to them.
Hope it helps.

Can the owner of a repo see clones?

I know that the owner of a repo is able to see a fork request when one is performed. But what about a clone? Can the owner of the repo see when someone clones it?
The question is too general, but let me answer the question as it stands now.
Can the owner of the repo see when someone clones it?
No, they cannot. If I go to one of your repositories and clone it to my local hard drive, the owner will not be able to view that activity. And why would you want to? Likely there are many clones of your repository.
Know that clones can live on other systems than GitHub.
Now, will the owner know that someone forked their repository on GitHub itself?
Yes, they will, assuming they pay attention.
I did the following:
Logged in as my main account
Created a repository
Set up a new dummy-account on an alternate email address
Forked the repository I created earlier
Logged back into my main account
This is what I see on my first page after logging in:
If I do the following:
Click on my repository
Click on the small 1 to the right of the "Fork" button:
Click on the "Members" tab:
Then I see this:
Conclusion:
Yes, the owner of a repository will see when someone makes a fork on GitHub, but no, they will not see it when someone makes a clone somewhere else.
As far what I found you CAN'T know when someone clones it (if you mean exact time) nor who cloned it.
But you can know how many clones were made on which date and the number of unique cloners from ths url.
https://github.com/{usernamme}/{reponame}/graphs/traffic
Insights tab:
However one thing I find fishy is unique cloners is more than unique visitors, how can someone decide to clone even without visiting the repo. I guess it may be bots in such cases.
You can use clone graph on GitHub to find out how many times your repository's source code is actually cloned in a given day. More information can be found here https://help.github.com/articles/about-repository-graphs/#traffic
Yes, it can be done.
Go to your account landing page- https://github.com/yourusername
Click on the repo you want to check traffic for.
Click on Insights on top navigation bar.
Click on Traffic on left navigation bar.
Voila, you will get your traffic including no of clones with a timeline.
Reference: clone graph
Open Github, find your repo, click on it. Then click on Insights and finally click on Traffic. Github shows a graph Traffic including git clones. Salutes!
As for now we can obtain this information with Rest API /audit-log,
but it is available only for Enterprise users with org:read permission.
We can see the actual users that have preformed fetch, clone and many more actions.
https://docs.github.com/en/rest/reference/orgs#get-the-audit-log-for-an-organization
as long as you have access to the repo, aka an ssh key on the filesystem with the remote, then yes. you would do as follows:
git fetch some_remote
git log some_remote/some_branch