So, total newbie to Git. Been reading through the guides and think I have the basics but am having difficulties accomplishing this one goal.
I have a repo created fo
Surprised no-one has referenced this guy's blog post yet.
Here's the relevant steps:
$ git clone git@github.com:YOURNAME/foo.git bar
$ cd bar
$ vim .git/config
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:YOURNAME/bar.git #replace foo with bar
$ git remote add upstream git@github.com:YOURNAME/foo.git
$ git push -u origin master
Instead of editing the config, I usually use a combination of git remote remove and git remote add.
You could also use git remote rename followed by git remote add if you wanted to keep the upstream origin around.