user3025492
user3025492

Reputation: 3043

How can I mirror a repository from one hosted location to another?

There's a hosted git repository and I don't have write permission for it. I cloned it locally, and would now like to set up my own github version. I basically want to continue hosted development where the other person left off. How can I do establish the remote hosted address as a different location?

Upvotes: 0

Views: 43

Answers (2)

zealoct
zealoct

Reputation: 94

I am not very clear about your question, sorry that i cannot leave a comment right now...But if what you mean is you want to clone some projects from a read-only repository and push it into your github account, you need to

  1. first create a repository in your github account
  2. git remote add somename git://github.com/username/repository.git
  3. git push somename master

Upvotes: 0

acadavid
acadavid

Reputation: 506

Once you have cloned the repository, you probably want to change the origin path to your new remote development site, so you would do this:

git remote set-url origin https://github.com/your_user/my_new_repo.git

or if you prefer SSH then:

git remote set-url origin [email protected]:your_user/your_repo.git

Now whenever you do git push it will push to the repo you pointed origin to.

Upvotes: 1

Related Questions