Git error fatal: No such remote 'origin'
Question
On my computer, I run some commands to create git repository.
And I want to push to remote server. So I create an empty repository on server. Run it.
On my computer, I try to use set-url to modify the remote of the repository, and I get an error.
Solution
When I running git remote -v
, no addresses are displayed. So I need to add, not modify. Run:
After running git remote -v
again, I can see the links of fetch and push.
Then push to server.