Git Error: fatal: remote origin already exists [How to Solve]

When you enter $git remote add [email protected] : djqiang (GitHub account name)/gitdemo (project name). Git

The following error occurred:

The solution is as follows:

1. Enter $git remote RM origin first

2. Then enter $git remote add origin [email protected] : djqiang/gitdemo.git will not report error

3. Error: could not remove config section ‘remote. Origin’. We need to modify the content of gitconfig file

4. Find the installation path of your GitHub, and mine is C:: (users) ﹣ ASUS ﹣ appdata ﹣ local ﹣ GitHub ﹣ portablegit_ ca477551eeb4aea0e4ae9fcd3358bd96720bb5c8\etc

5. Find a file named gitconfig, open it, and delete the line [remote “origin”]

Similar Posts: