dopatraman
dopatraman

Reputation: 13908

cant remote add to github

This is the first commit I'm adding to git. I ave initialized git inside my directory and am trying to remote add following this command:

git remote add origin [email protected]:pvenkat/Scribble-pad.git

But I receive a fatal error telling me remote origin already exists:

fatal: remote origin already exists

Does this mean I must remove the previous remote origin? If so how do i do that? If anyone knows whats wrong please help.

Upvotes: 0

Views: 484

Answers (2)

Tom
Tom

Reputation: 19302

You probably already have the origin defined.

You can run,

git remote rm origin

Then,

git remote add origin [email protected]:pvenkat/Scribble-pad.git

Upvotes: 5

Adam Soltys
Adam Soltys

Reputation: 3261

You can update the URL of your existing remote with the following command:

git config remote.origin.url [email protected]:pvenkat/Scribble-pad.git

Upvotes: 1

Related Questions