You can use git remote to manage your remote
- rename origin
git remote rename origin old_origin
- add a new origin
git remote add origin git://github.com/my/forked/repo.git
git fetch origin # will create all the remote branches references
# in your local repo
git branch --set-upstream master origin/master
The "nothing to commit (working directory clean)
" message of git status
won't prevent you to push.
After changing the origin, you should see:
$ git status
# On branch master# Your branch is ahead of 'origin/master' by xxx commits.#
nothing to commit (working directory clean)
That means you have some commits to push to your new origin.