2

I've got a Github project (https://github.com/gbrits/yeoman-less) that I'd like to use as a quickstart for some other projects. Each of these other projects need to get their own repo.

So git clone https://github.com/gbrits/yeoman-less (alone) doesn't work, since I need to do something like change the origin after the clone to point to a different remote endpoint.

Related: hos would you create a remote origin in github from the commandline, instead of having to manually create it and then linking it up in the commandline?

Geert-Jan
  • 18,623
  • 16
  • 75
  • 137

1 Answers1

0

Pretty easy it appears.

First clone

git clone git://..

Optionally change name of local dir.

intermezzo: create new remote github repo (from website) or from command-line (see below): (from Is it possible to create a remote repo on GitHub from the CLI without opening browser?

curl -u 'USER:PASS' https://api.github.com/user/repos -d '{"name":"REPO"}'
git remote add origin git@github.com:USER/REPO.git
git push origin master

Change origin

git remote set-url origin git://<new repo>

And push

git push -u origin master

Community
  • 1
  • 1
Geert-Jan
  • 18,623
  • 16
  • 75
  • 137