Nov 10, 2018

How push to new repository in Git

$ git remote add origin git@github.com:i88ca/guestbook-jsf.git
fatal: remote origin already exists.

$ git remote rm origin
$ git remote add origin git@github.com:i88ca/guestbook-jsf.git
$ git push -u origin master

In the above, you remove the existing remote repository first. "origin" is the local name of the remote repository. You can use the other name like:

git remote add anotherName git@github.com:i88ca/guestbook-jsf.git