problem
When adding a remote GitHub repository using git, you will be prompted with an error: fatal: remote origin already exists , As shown in the figure below:
resolvent
1. Delete the remote git warehouse first:
$ git remote rm origin
2. Add the remote git warehouse again:
$ git remote add origin [email protected]:FBing/java-code-generator
However, if an error is reported when git remote RM origin is executed, we need to manually modify the contents of the gitconfig file:
$ vi .git/config
As shown in the figure below:
Just delete the line [remote “origin”].
Similar Posts:
- Git Error: fatal: remote origin already exists.
- Git Error: fatal: remote origin already exists [How to Solve]
- git:fatal: No configured push destination.
- GitHub common operations and common errors! Error prompt: fatal: remote origin already exists
- Git Error: Github:remote: Invalid username or password……
- fatal:’origin’ does not appear to be a git repository fatal:Could not read from remote re…
- Updates were rejected because the remote contains work that you do
- How to Solve Code cloud error: fatal: remote origin already exists
- How to Solve error: failed to push some refs to ‘xxxx’