0

How I can clone somebody else' remote repo into my remote repo?

For now I know how to do the following: 1. Clone into local that repo1 2. Then manually change config url for mine 3. Then create new same name repo1 online on my git 4. Then push master remote from my local

I assume there is some way to do this for all samples/demo people of the same user, so I am not able to solve this:

enter code here
git clone git/John/repo1
... do changes in config for url = mine
git push origin master
Andrew Brēza
  • 7,705
  • 3
  • 34
  • 40
Mario Trento
  • 513
  • 1
  • 4
  • 14
  • https://www.youtube.com/watch?v=CDeG4S-mJts – Mario Trento Mar 10 '15 at 23:49
  • After the `clone` then [do this](http://stackoverflow.com/questions/4885999/with-github-how-do-i-push-all-branches-when-adding-an-existing-repo). I normally use two different names for the remotes (e.g. `john` and `matt`) , instead of `origin`. – M.M Mar 11 '15 at 00:37
  • If you have shell access to the remote server you can just log into it and do `git clone --bare git/John/repo1` – M.M Mar 11 '15 at 00:37
  • For the general case, what you are doing is how it normally happens. If you use a site like github, there's a "fork" button that will do that for you. – Roman Mar 11 '15 at 00:52

0 Answers0