1

I'm creating a Git repository for a website I'm working on for a client. I was about to set the origin, associating the repo with my GitHub account, but what happens if in the future someone else takes the project over? Without creating GitHub account for each of my clients, how do I make it so a Git repository can be transfered to someone else?

Thanks

jared_flack
  • 1,606
  • 2
  • 17
  • 24

2 Answers2

2

Remember that "setting the origin for a repo" is done with:

git remote add origin /url/repo

That has bearing only for your local clone and wouldn't be replicated by anyone forking your repo on GitHub and cloning their own fork: their origin would point to their fork, not yours.

In short, adding a remote is a local operation which is not replicated (push/pull) across repositories.
It is stored in the local config of a repo (.git/config)

GitHub fork

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • I made a test repo and now realize that "origin" is just a name given to a remote repository, which I can have multiple of. So...`git remote add newperson git@github.com:newperson/project.git; git push newperson` would be one way to hand off a repo. And forking would have the same basic outcome. – jared_flack Feb 17 '13 at 19:40
1

For one thing, you can transfer Github repos to other accounts (there is an option for that on the repo's settings page, and Github support will also help with it if there's any problems).

For another, the people who takes over a project needs only to make a new repo on his own github account and push the contents of the repo (and you can delete it then). He only needs to get the repo contents from you, which can be done by: a) copying your working copy (e.g. tar it and give it to him) or b) by pulling from your github (you will need to give him read access to your repo, which is probably private -- but since you can remove it afterward, that shouldnt be a big deal).

Nevik Rehnel
  • 49,633
  • 6
  • 60
  • 50