Aditya Pandey
Aditya Pandey

Reputation: 140

Can two people put same Repo on Github?

Context : Me and my friend are working on a project, and It's under my account. But he wants it to be shown as his Repo too, Currently, If I created the Repo, technically, I own it, but we both are working equally on this project, hence it should be displayed on his github account too. I looked for forking, which is great but it'll make it look like he is working on my project. I dont know much about the GitHub system, so the only practical thing I can think of is that we complete the project and at the end he re-uploads the whole repo again under his account.

Things I want to ask :

  1. Is there any alternative solution to this problem?
  2. If not, will all the commit history and logs will be preserved if he clone the repo and re-uploads it on Github?
  3. Any suggestions are welcome if you feel we have wrong idea about the Repo ownership etc.

Upvotes: 0

Views: 1728

Answers (2)

Zach Tait
Zach Tait

Reputation: 220

It is not possible to co-own a repo. There are however some steps you can take to ensure it is clear you are working together.

You can pin the repo to his profile and add him as a collaborator.

Repositories-> Click on the repository you want to add collaborators-> Click on Settings -> on your left, click on 'Collaborators', which is right below 'Options' -> search for the person you want to add -> finally click on 'Add Collaborator'

Additionally, if you wanted to go a step further you could create an organisation together for free. https://github.com/organizations/plan This is probably the closest option to what you described in your question.

More info can be found in the following answers if you want to take a look: Add another user to project owners in Github

Upvotes: 1

Simon Doppler
Simon Doppler

Reputation: 2103

  1. You can customize profile with pinned repositories. As long as you contributed in the pinned repository, you may pin it.

  2. Pushing the repository to his own account will indeed preserve history.

  3. Instead of pulling/pushing, he could fork the repository and then only push changes.

I would go with the first option of pinning the repository to his profile.

Upvotes: 1

Related Questions