This article explains how to fix git title: ‘How to resolve git fatal: remote origin already exists’ during the push or include commands.To make any type of application or folder/directory as git enabled, you have to initialize the git init command.Once git is initialized, we need to either produce a new repository or present repository come map this come existing directory.if this directory is produced in nested folder of any git repository, git command throws git fatal: remote origin currently exists error.
You are watching: Fatal: remote origin already exists.
What walk it beginning mean?This error comes during multiple usage casescreated a local nested folder application which is a kid folder a local git repository, which this folder desire to map to new remote repository
B:\blog\jswork>git remote include origin https://github.com/intkiran/react-auth0-login.gitfatal: far origin already exists.
This does way you are producing origin neighborhood name in already adding existing repository.In any kind of local repository, exactly how do you recognize the far repository url? utilizing the -v option gives the local name with remote url as described following
origin https://github.com/intkiran/react-auth0-login.git (fetch)origin https://github.com/intkiran/react-auth0-login.git (push)
This will provides the remote repository url mapped with local name ie origin.origin is the local name for remote repository offered by default.This error occurs throughout adding brand-new url to the present origin.This post covers the equipment for adhering to errors in git commandfatal: No such remote:Remote origin already exists ~ above ‘git push’ to a new repository
SolutionThere are countless ways we have the right to fix this.
Remove beginning name indigenous the provided existing repositoryFirst, delete the neighborhood name beginning for given remote repository using adhering to command
if remote-repo-url does no exists, it gives an error fatal: No together remote:
Replace current origin to new urlbelow collection the new url for neighborhood name origin.
See more: How To Cut A Shallot S - How To Brunoise A Shallot Recipe
Join 6,000 subscribers and get a daily digest of complete stack tutorials ceded to your inbox directly.No spam ever. Unsubscribe any time.